Skip to content

Conversation

Copy link

Copilot AI commented Dec 22, 2025

Resolves TypeScript compilation errors from missing Node v20 type definitions: esnext.disposable lib, asyncDispose/dispose on SymbolConstructor, Disposable/AsyncDisposable interfaces, and TextEncoder incompatibilities.

Changes

Dependency upgrades across all packages:

  • TypeScript: ^4.9.x5.2.2
  • Added @types/node: ^20.11.0
  • Added tslib: ^2.6.0 (required by TypeScript's importHelpers)

Configuration cleanup:

  • Removed deprecated suppressImplicitAnyIndexErrors from all tsconfig.json files (no longer supported in TS 5.5+)
  • Updated test expectations for tsconfig parsing

Files modified:

  • package.json, shared/package.json, ts-plugin/package.json, eslint-ts-plugin/package.json
  • All tsconfig.json and tsconfig.test.json files
  • shared/test/src/tsConfigDetails.test.ts

Note

The eslint-ts-plugin has separate compilation errors from @types/eslint type changes unrelated to this Node.js type upgrade.

Original prompt

Problem

The build is failing with TypeScript compilation errors related to @types/node compatibility issues. The errors include:

  • Missing lib definition for 'esnext.disposable'
  • Properties like asyncDispose and dispose not existing on SymbolConstructor
  • Missing type definitions for Disposable and AsyncDisposable
  • Interface incompatibilities with TextEncoder

Reference: https://github.com/nevware21/grunt-plugins/actions/runs/20438137550/job/58724440782?pr=325

Solution

Upgrade TypeScript to version 5.2.2 and the corresponding compatible @types/node version to resolve these type errors.

Files to Update

Update the following package.json files:

1. Root package.json

  • Update typescript from ^4.9.5 to 5.2.2
  • Add @types/node as a devDependency with version ^20.11.0 (compatible with Node v20 and TypeScript 5.2.2)

2. shared/package.json

  • Update typescript from ^4.9.4 to 5.2.2
  • Add @types/node as a devDependency with version ^20.11.0

3. ts-plugin/package.json

  • Update typescript from ^4.9.4 to 5.2.2
  • Add @types/node as a devDependency with version ^20.11.0

4. eslint-ts-plugin/package.json

  • Update typescript from ^4.9.4 to 5.2.2
  • Add @types/node as a devDependency with version ^20.11.0

Expected Changes

All package.json files should have:

{
  "devDependencies": {
    "typescript": "5.2.2",
    "@types/node": "^20.11.0"
  }
}

This will ensure all packages use the same TypeScript version and have proper Node.js type definitions that support the newer TypeScript features including disposable symbols and async disposables.

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits December 22, 2025 16:52
Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
Copilot AI changed the title [WIP] Update TypeScript and @types/node for compatibility fixes Upgrade TypeScript to 5.2.2 and add @types/node for Node v20 compatibility Dec 22, 2025
Copilot AI requested a review from nev21 December 22, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants