Open colinaaa opened 3 months ago
@colinaaa - Would you be willing to raise a PR making the necessary changes?
I tried to upgrade to TS 5.5. And the following errors showed up:
[build:typescript] common/temp/default/node_modules/.pnpm/@typescript-eslint+typescript-estree@6.19.1_typescript@5.5.2/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts:17:3594 - (TS2694) Namespace 'ts' has no exported member 'InputFiles'.
[build:typescript] common/temp/default/node_modules/.pnpm/@typescript-eslint+typescript-estree@6.19.1_typescript@5.5.2/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts:17:3610 - (TS2694) Namespace 'ts' has no exported member 'UnparsedSource'.
[build:lint] eslint/eslint-plugin/src/hoistJestMockPatterns.ts - Parsing error: Cannot use 'in' operator to search for 'illegalDecorators' in 93
Looks like it also needs https://github.com/typescript-eslint/typescript-eslint/issues/8996 to work with TS 5.5.
Should I just upgrade typescript-eslint
-related dependencies from ~6.19.0
to 7.14.1
(the version that supports TS 5.5)?
Also, the Simplified Reference Directive Declaration Emit change of TS 5.5 seems to cause errors for tests.
E.g.:
In build-tests/api-extractor-test-01/dist/api-extractor-test-01.d.ts
:
- /// <reference types="jest" />
- /// <reference lib="es2015.symbol.wellknown" />
- /// <reference lib="es2018.intl" />
These Reference Directive Declaration are eliminated, which makes api-extractor-test-02
failed:
==> Starting build.js for api-extractor-test-02
---> node node_modules/typescript/lib/tsc
../api-extractor-test-01/dist/api-extractor-test-01.d.ts(59,24): error TS2503: Cannot find namespace 'jest'.
Summary
After upgrading to the latest Typescript version (
5.5.2
) withisolatedDeclarations
enabled, theapi-extractor
failed to run.Repro steps
isolatedDeclarations
api-extractor
Expected result:
No error.
Actual result:
Failed to run api-extractor.
Details
As mentioned in docs, this could be fixed by upgrading the TypeScript compiler in api-extractor.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/api-extractor
version?node -v
)?