-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[api-extractor] Upgrade bundled TypeScript to 5.7 #4815
Conversation
1. Upgrade TypeScript to `5.5.2` 2. Upgrade @typescript-eslint/parser to `7.14.1` 3. Adopt breaking changes of typescript-eslint
@microsoft-github-policy-service agree |
Hi @iclanton, I failed to solve the lint and build error of this change. Would you please help me with it? Thanks |
@colinaaa sure |
The issue is that the decoupled copies of the |
Is there any plan to get this through? |
NOTE: This is a type signature change that didn't affect the runtime contract; it should be fully backwards compatible
…out resolve() signatures being inconsistent between @types/node/module.d.ts and lib.dom.d.ts: Warning: C:/Git/rushstack/common/temp/default/node_modules/.pnpm/@types+node@18.17.15/node_modules/@types/node/module.d.ts:210:13 - (TS2386) Overload signatures must all be optional or required.
…tible with @types/node@14.0.1: Warning: C:\Git\rushstack\common\temp\default\node_modules\.pnpm\@types+node@14.0.1\node_modules\@types\node\ts3.2\globals.d.ts:10:11 - (TS2320) Interface 'Buffer' cannot simultaneously extend types 'Uint8Array<ArrayBuffer>' and 'Uint8Array<ArrayBufferLike>'. Named property 'buffer' of types 'Uint8Array<ArrayBuffer>' and 'Uint8Array<ArrayBufferLike>' are not identical.
Fixes #5052 |
@iclanton I have temporarily postponed these issues by upgrading API Extractor's TypeScript version to 5.7.2. while rollingback the other projects across the repo to version 5.4.2. In this way, the API Extractor work can be merged separately from the repo upgrade work. The test projects are all building without errors, although there were warnings for the Heft's TypeScript 2.9.x test project. I didn't dig too deeply into that one -- since |
@@ -8,7 +8,7 @@ | |||
"declarationMap": true, | |||
"experimentalDecorators": true, | |||
"strictNullChecks": true, | |||
"lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These projects were failing with a TypeScript 5.7.2 strict checks warning about resolve()
signatures being inconsistent between @types/node/module.d.ts
versus the compiler's lib.dom.d.ts
:
Warning: C:/Git/rushstack/common/temp/default/node_modules/.pnpm/https://github.com/types+node@18.17.15/node_modules/@types/node/module.d.ts:210:13 - (TS2386) Overload signatures must all be optional or required.
The problem does not repro in @types/node@20
because the require()
API is no longer experimental, however it does repro in the latest version of @types/node@18
. This seems like an actual bug for @types/node@18
that will only repro for people who are (1) combining dom
and node
runtime targets (e.g. a web app with Jest), and also (2) are not shamefully setting skipLibCheck: true
in their tsconfig.json.
Summary
Fixes #4805
Details
TypeScript release notes:
https://devblogs.microsoft.com/typescript/announcing-typescript-5-5
5.5.2
@typescript-eslint/parser
to7.14.1
typescript-eslint
How it was tested
Impacted documentation