From 500d2a36a519e66d96f6ac24a65f5b955c14c814 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 29 Nov 2023 19:55:03 +0000 Subject: [PATCH] Document reasons for fixer not generating fixes. This is already the current behavior of the compiler, it refuses to return a typeNode from checker.typeToTypeNode when the underlying type is from node_module. Signed-off-by: Hana Joo --- ...EmitCommonJsModuleReferencedType.d.ts.diff | 16 +++++++------- ...EmitForGlobalishSpecifierSymlink.d.ts.diff | 18 ++++++++-------- ...mitForGlobalishSpecifierSymlink2.d.ts.diff | 18 ++++++++-------- ...nEmitObjectAssignedDefaultExport.d.ts.diff | 16 +++++++------- ...onEmitReexportedSymlinkReference.d.ts.diff | 21 +++++++++++-------- ...nEmitReexportedSymlinkReference2.d.ts.diff | 18 ++++++++-------- ...nEmitReexportedSymlinkReference3.d.ts.diff | 10 ++++----- ...mitWithInvalidPackageJsonTypings.d.ts.diff | 18 ++++++++-------- ...rtsSpecifierGenerationConditions.d.ts.diff | 18 ++++++++-------- ...nodeModuleReexportFromDottedPath.d.ts.diff | 18 ++++++++-------- ...larationEmitModuleNamesImportRef.d.ts.diff | 18 ++++++++-------- ...ersionsDeclarationEmit.multiFile.d.ts.diff | 18 ++++++++-------- ...mit.multiFileBackReferenceToSelf.d.ts.diff | 10 ++++----- ...multiFileBackReferenceToUnmapped.d.ts.diff | 18 ++++++++-------- ...arationEmitCommonJsModuleReferencedType.ts | 2 +- ...arationEmitForGlobalishSpecifierSymlink.ts | 2 +- ...rationEmitForGlobalishSpecifierSymlink2.ts | 2 +- ...larationEmitObjectAssignedDefaultExport.ts | 2 +- ...clarationEmitReexportedSymlinkReference.ts | 2 +- ...larationEmitReexportedSymlinkReference2.ts | 2 +- ...larationEmitReexportedSymlinkReference3.ts | 2 +- ...rationEmitWithInvalidPackageJsonTypings.ts | 2 +- .../nodeModuleReexportFromDottedPath.ts | 2 +- ...LinkDeclarationEmitModuleNamesImportRef.ts | 2 +- .../typesVersionsDeclarationEmit.multiFile.ts | 2 +- ...rationEmit.multiFileBackReferenceToSelf.ts | 2 +- ...onEmit.multiFileBackReferenceToUnmapped.ts | 2 +- ...lesExportsSpecifierGenerationConditions.ts | 2 +- 28 files changed, 133 insertions(+), 130 deletions(-) diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCommonJsModuleReferencedType.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCommonJsModuleReferencedType.d.ts.diff index 15e2f84e1ae40..2d648c369667e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCommonJsModuleReferencedType.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCommonJsModuleReferencedType.d.ts.diff @@ -1,11 +1,11 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,15 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,15 @@ + +//// [r/entry.d.ts] @@ -21,7 +21,7 @@ ==== r/node_modules/foo/node_modules/nested/index.d.ts (0 errors) ==== export interface NestedProps {} -@@ -20,12 +27,14 @@ +@@ -20,12 +27,14 @@ ==== node_modules/root/index.d.ts (0 errors) ==== export interface RootProps {} @@ -36,5 +36,5 @@ + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. export const y: RootProps = bar(); - -\ No newline at end of file + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff index 3280331371223..f49d30ab5d52e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff @@ -1,17 +1,17 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,45 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,45 @@ //// [/p1/index.d.ts] -export declare const a: import("typescript-fsa").A; --//# sourceMappingURL=index.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -53,5 +53,5 @@ +==== /p2/index.d.ts (0 errors) ==== + export const a: import("typescript-fsa").A; + -+ -\ No newline at end of file ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink2.d.ts.diff index 6468cad8211a9..31446c0b51ead 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink2.d.ts.diff @@ -1,17 +1,17 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,33 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,33 @@ //// [/p1/index.d.ts] -export declare const a: import("typescript-fsa").A; --//# sourceMappingURL=index.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -41,5 +41,5 @@ +==== /p2/index.d.ts (0 errors) ==== + export const a: import("typescript-fsa").A; + -+ -\ No newline at end of file ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectAssignedDefaultExport.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectAssignedDefaultExport.d.ts.diff index d4de922a7c4ea..10302f60e0a5b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectAssignedDefaultExport.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectAssignedDefaultExport.d.ts.diff @@ -1,11 +1,11 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,16 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,16 @@ + +//// [index.d.ts] @@ -22,7 +22,7 @@ ==== node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts (0 errors) ==== interface Statics { -@@ -30,21 +38,26 @@ +@@ -30,21 +38,26 @@ } declare const styled: StyledInterface; @@ -49,5 +49,5 @@ !!! error TS2742: The inferred type of 'default' cannot be named without a reference to 'styled-components/node_modules/hoist-non-react-statics'. This is likely not portable. A type annotation is necessary. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - -\ No newline at end of file + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference.d.ts.diff index d86a0720c635e..291990d47ad82 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference.d.ts.diff @@ -1,19 +1,22 @@ -// [[Reason: TODO: is not auto fixed, should be fixed.]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,7 +3,55 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,7 +3,55 @@ //// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; //# sourceMappingURL=index.d.ts.map //// [/.src/monorepo/pkg3/dist/keys.d.ts] -import { MetadataAccessor } from "@raymondfeng/pkg2"; -export declare const ADMIN: MetadataAccessor; --//# sourceMappingURL=keys.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=keys.d.ts.map +\ No newline at end of file + + + +export declare const ADMIN: invalid; +//# sourceMappingURL=keys.d.ts.map +/// [Errors] //// @@ -64,5 +67,5 @@ + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" -+ } -\ No newline at end of file ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference2.d.ts.diff index b3b26e0c51ef6..4cdd52e75989f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference2.d.ts.diff @@ -1,19 +1,19 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,7 +3,58 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,7 +3,58 @@ //// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; //# sourceMappingURL=index.d.ts.map //// [/.src/monorepo/pkg3/dist/keys.d.ts] -import { MetadataAccessor } from "@raymondfeng/pkg2"; -export declare const ADMIN: MetadataAccessor; --//# sourceMappingURL=keys.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=keys.d.ts.map +\ No newline at end of file +export declare const ADMIN: invalid; +//# sourceMappingURL=keys.d.ts.map +/// [Errors] //// @@ -67,5 +67,5 @@ + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" -+ } -\ No newline at end of file ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference3.d.ts.diff index eee44685cd494..931e89fd2e8c0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference3.d.ts.diff @@ -1,11 +1,11 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,21 +2,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,21 +2,27 @@ //// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff index ce8ce25d6afbc..f7ee007210367 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff @@ -1,18 +1,18 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,6 +4,37 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,6 +4,37 @@ export interface MutableRefObject { current: T; } export declare function useRef(current: T): MutableRefObject; -export declare const useCsvParser: () => MutableRefObject; --//# sourceMappingURL=index.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare const useCsvParser: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -45,5 +45,5 @@ + const parserRef = useRef(null); + return parserRef; + }; -+ -\ No newline at end of file ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts.diff index a34929cfa8bbc..025080023f2d3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts.diff @@ -1,17 +1,17 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,42 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,42 @@ //// [index.d.ts] -export declare const a: () => Promise; --//# sourceMappingURL=index.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -50,5 +50,5 @@ + "default": "./other.js" + } + } -+ } -\ No newline at end of file ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModuleReexportFromDottedPath.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModuleReexportFromDottedPath.d.ts.diff index 9cee87fd3e925..906f1ae6b12bd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModuleReexportFromDottedPath.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModuleReexportFromDottedPath.d.ts.diff @@ -1,11 +1,11 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,7 +1,31 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,31 @@ //// [/index.d.ts] @@ -13,8 +13,8 @@ -declare const _default: PrismaClient; +declare const _default: invalid; export default _default; -\ No newline at end of file --//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + @@ -40,5 +40,5 @@ + export default new EnhancedPrisma(); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -\ No newline at end of file ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff index 698cca3f6b32f..dcc508a75ddfc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff @@ -1,17 +1,17 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,31 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,31 @@ //// [Folder/monorepo/core/index.d.ts] -export declare function getStyles(): import("styled-components").InterpolationValue[]; --//# sourceMappingURL=index.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare function getStyles(): invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -39,5 +39,5 @@ + } + +==== Folder/node_modules/styled-components/typings/styled-components.d.ts (0 errors) ==== -+ export interface InterpolationValue {} -\ No newline at end of file ++ export interface InterpolationValue {} +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFile.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFile.d.ts.diff index b45be22a50ea4..02eca91a38829 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFile.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFile.d.ts.diff @@ -1,18 +1,18 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,49 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,49 @@ //// [/.src/main.d.ts] -export declare const va: import("ext").A; -export declare const vb: import("ext/other").B; --//# sourceMappingURL=main.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=main.d.ts.map +\ No newline at end of file +export declare const va: invalid; +export declare const vb: invalid; +//# sourceMappingURL=main.d.ts.map @@ -58,5 +58,5 @@ +==== node_modules/ext/ts3.1/other.d.ts (0 errors) ==== + export interface B {} + export function fb(): B; -+ -\ No newline at end of file ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts.diff index 6418130c28fdf..7ab99de784bc5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts.diff @@ -1,11 +1,11 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,23 +1,26 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,26 @@ //// [/.src/main.d.ts] diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts.diff index 7099d9251a3e1..ad3a8a0a52be8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts.diff @@ -1,18 +1,18 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,46 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,46 @@ //// [/.src/main.d.ts] -export declare const va: import("ext").A2; -export declare const va2: import("ext").A2; --//# sourceMappingURL=main.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=main.d.ts.map +\ No newline at end of file +export declare const va: invalid; +export declare const va2: invalid; +//# sourceMappingURL=main.d.ts.map @@ -55,5 +55,5 @@ + +==== node_modules/ext/ts3.1/index.d.ts (0 errors) ==== + export * from "../other"; -+ -\ No newline at end of file ++ +\ No newline at end of file diff --git a/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts b/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts index abb18b39d3ae7..a09591b80efdb 100644 --- a/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts +++ b/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: r/node_modules/foo/node_modules/nested/index.d.ts export interface NestedProps {} // @filename: r/node_modules/foo/other/index.d.ts diff --git a/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts index 032322dcc4048..f713a42bfbe74 100644 --- a/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts +++ b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts @@ -1,6 +1,6 @@ // @useCaseSensitiveFilenames: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: /p1/node_modules/typescript-fsa/src/impl.d.ts export function getA(): A; export enum A { diff --git a/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts index f861dcdb61558..774edf31d6d4c 100644 --- a/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts +++ b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts @@ -1,6 +1,6 @@ // @useCaseSensitiveFilenames: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: /cache/typescript-fsa/src/impl.d.ts export function getA(): A; export enum A { diff --git a/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts b/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts index bac84ce522045..3e1af36893965 100644 --- a/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts +++ b/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts @@ -1,7 +1,7 @@ // @target: es6 // @module: commonjs // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts interface Statics { "$$whatever": string; diff --git a/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts b/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts index 1c4d534eeeca6..e41e6bee31460 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts @@ -1,4 +1,4 @@ -// @isolatedDeclarationFixedDiffReason: TODO: is not auto fixed, should be fixed. +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: monorepo/pkg1/dist/index.d.ts export * from './types'; // @filename: monorepo/pkg1/dist/types.d.ts diff --git a/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts b/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts index 338b8be8561fc..c86275ebb9fd9 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts @@ -1,5 +1,5 @@ // @filename: monorepo/pkg1/dist/index.d.ts -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. export * from './types'; // @filename: monorepo/pkg1/dist/types.d.ts export declare type A = { diff --git a/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts b/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts index 23b939690b9d4..9734526147fab 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts @@ -1,4 +1,4 @@ -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: monorepo/pkg1/dist/index.d.ts export * from './types'; // @filename: monorepo/pkg1/dist/types.d.ts diff --git a/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts b/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts index 850b3421709b0..67e141da2db22 100644 --- a/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts +++ b/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: /p1/node_modules/csv-parse/lib/index.d.ts export function bar(): number; // @filename: /p1/node_modules/csv-parse/package.json diff --git a/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts b/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts index 890ccbc5eeaa0..c443e432585fe 100644 --- a/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts +++ b/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @Filename: /node_modules/.prisma/client/index.d.ts export interface PrismaClientOptions { diff --git a/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts b/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts index 3549b07c618b7..6744a0dc44323 100644 --- a/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts +++ b/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts @@ -1,7 +1,7 @@ // @declaration: true // @useCaseSensitiveFileNames: false // @noImplicitReferences: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: Folder/monorepo/package-a/index.d.ts export declare const styles: import("styled-components").InterpolationValue[]; diff --git a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts index 198f47047cbd3..a5c07d589e212 100644 --- a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts +++ b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts @@ -2,7 +2,7 @@ // @target: esnext // @module: commonjs // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: node_modules/ext/package.json { "name": "ext", diff --git a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts index 7f0a7e7fa30d7..763fd2252928e 100644 --- a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts +++ b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts @@ -2,7 +2,7 @@ // @target: esnext // @module: commonjs // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: node_modules/ext/package.json { "name": "ext", diff --git a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts index 1f11f03d4e647..9254f29d2a2e6 100644 --- a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts +++ b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts @@ -2,7 +2,7 @@ // @target: esnext // @module: commonjs // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. // @filename: node_modules/ext/package.json { "name": "ext", diff --git a/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts b/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts index 40439188da3ed..116f36798815c 100644 --- a/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts +++ b/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts @@ -2,7 +2,7 @@ // @lib: es2020 // @declaration: true // @filename: index.ts -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules. export const a = async () => (await import("inner")).x(); // @filename: node_modules/inner/index.d.ts