Skip to content

Commit af1e6fa

Browse files
Merge pull request #126 from h-joo/unfixed
Document reasons for fixer not generating fixes.
2 parents d89c2ae + 500d2a3 commit af1e6fa

File tree

28 files changed

+133
-130
lines changed

28 files changed

+133
-130
lines changed

tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCommonJsModuleReferencedType.d.ts.diff

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// [[Reason: TODO File is not auto-fixed]] ////
1+
// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] ////
22

33
//// [tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -1,8 +1,15 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -1,8 +1,15 @@
99

1010
+
1111
+//// [r/entry.d.ts]
@@ -21,7 +21,7 @@
2121

2222
==== r/node_modules/foo/node_modules/nested/index.d.ts (0 errors) ====
2323
export interface NestedProps {}
24-
@@ -20,12 +27,14 @@
24+
@@ -20,12 +27,14 @@
2525
==== node_modules/root/index.d.ts (0 errors) ====
2626
export interface RootProps {}
2727

@@ -36,5 +36,5 @@
3636
+ ~~~~~
3737
+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit.
3838
export const y: RootProps = bar();
39-
40-
\ No newline at end of file
39+
40+
\ No newline at end of file

tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
// [[Reason: TODO File is not auto-fixed]] ////
1+
// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] ////
22

33
//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -1,5 +1,45 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -1,5 +1,45 @@
99

1010

1111
//// [/p1/index.d.ts]
1212
-export declare const a: import("typescript-fsa").A;
13-
-//# sourceMappingURL=index.d.ts.map
14-
\ No newline at end of file
13+
-//# sourceMappingURL=index.d.ts.map
14+
\ No newline at end of file
1515
+export declare const a: invalid;
1616
+//# sourceMappingURL=index.d.ts.map
1717
+/// [Errors] ////
@@ -53,5 +53,5 @@
5353
+==== /p2/index.d.ts (0 errors) ====
5454
+ export const a: import("typescript-fsa").A;
5555
+
56-
+
57-
\ No newline at end of file
56+
+
57+
\ No newline at end of file

tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink2.d.ts.diff

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
// [[Reason: TODO File is not auto-fixed]] ////
1+
// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] ////
22

33
//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -1,5 +1,33 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -1,5 +1,33 @@
99

1010

1111
//// [/p1/index.d.ts]
1212
-export declare const a: import("typescript-fsa").A;
13-
-//# sourceMappingURL=index.d.ts.map
14-
\ No newline at end of file
13+
-//# sourceMappingURL=index.d.ts.map
14+
\ No newline at end of file
1515
+export declare const a: invalid;
1616
+//# sourceMappingURL=index.d.ts.map
1717
+/// [Errors] ////
@@ -41,5 +41,5 @@
4141
+==== /p2/index.d.ts (0 errors) ====
4242
+ export const a: import("typescript-fsa").A;
4343
+
44-
+
45-
\ No newline at end of file
44+
+
45+
\ No newline at end of file

tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectAssignedDefaultExport.d.ts.diff

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// [[Reason: TODO File is not auto-fixed]] ////
1+
// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] ////
22

33
//// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -1,8 +1,16 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -1,8 +1,16 @@
99

1010
+
1111
+//// [index.d.ts]
@@ -22,7 +22,7 @@
2222

2323
==== node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts (0 errors) ====
2424
interface Statics {
25-
@@ -30,21 +38,26 @@
25+
@@ -30,21 +38,26 @@
2626
}
2727

2828
declare const styled: StyledInterface;
@@ -49,5 +49,5 @@
4949
!!! 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.
5050
+ ~~
5151
+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit.
52-
53-
\ No newline at end of file
52+
53+
\ No newline at end of file

tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference.d.ts.diff

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
// [[Reason: TODO: is not auto fixed, should be fixed.]] ////
1+
// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] ////
22

33
//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -3,7 +3,55 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -3,7 +3,55 @@
99
//// [/.src/monorepo/pkg3/dist/index.d.ts]
1010
export * from './keys';
1111
//# sourceMappingURL=index.d.ts.map
1212
//// [/.src/monorepo/pkg3/dist/keys.d.ts]
1313
-import { MetadataAccessor } from "@raymondfeng/pkg2";
1414
-export declare const ADMIN: MetadataAccessor<boolean, import("@raymondfeng/pkg2").IdType>;
15-
-//# sourceMappingURL=keys.d.ts.map
16-
\ No newline at end of file
15+
-//# sourceMappingURL=keys.d.ts.map
16+
\ No newline at end of file
17+
18+
19+
1720
+export declare const ADMIN: invalid;
1821
+//# sourceMappingURL=keys.d.ts.map
1922
+/// [Errors] ////
@@ -64,5 +67,5 @@
6467
+ "description": "",
6568
+ "main": "dist/index.js",
6669
+ "typings": "dist/index.d.ts"
67-
+ }
68-
\ No newline at end of file
70+
+ }
71+
\ No newline at end of file

tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference2.d.ts.diff

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
// [[Reason: TODO File is not auto-fixed]] ////
1+
// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] ////
22

33
//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -3,7 +3,58 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -3,7 +3,58 @@
99
//// [/.src/monorepo/pkg3/dist/index.d.ts]
1010
export * from './keys';
1111
//# sourceMappingURL=index.d.ts.map
1212
//// [/.src/monorepo/pkg3/dist/keys.d.ts]
1313
-import { MetadataAccessor } from "@raymondfeng/pkg2";
1414
-export declare const ADMIN: MetadataAccessor<boolean, import("@raymondfeng/pkg2/dist/secondary").IdType>;
15-
-//# sourceMappingURL=keys.d.ts.map
16-
\ No newline at end of file
15+
-//# sourceMappingURL=keys.d.ts.map
16+
\ No newline at end of file
1717
+export declare const ADMIN: invalid;
1818
+//# sourceMappingURL=keys.d.ts.map
1919
+/// [Errors] ////
@@ -67,5 +67,5 @@
6767
+ "description": "",
6868
+ "main": "dist/index.js",
6969
+ "typings": "dist/index.d.ts"
70-
+ }
71-
\ No newline at end of file
70+
+ }
71+
\ No newline at end of file

tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference3.d.ts.diff

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// [[Reason: TODO File is not auto-fixed]] ////
1+
// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] ////
22

33
//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -2,21 +2,27 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -2,21 +2,27 @@
99

1010
//// [/.src/monorepo/pkg3/dist/index.d.ts]
1111
export * from './keys';

tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
// [[Reason: TODO File is not auto-fixed]] ////
1+
// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] ////
22

33
//// [tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -4,6 +4,37 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -4,6 +4,37 @@
99
export interface MutableRefObject<T> {
1010
current: T;
1111
}
1212
export declare function useRef<T>(current: T): MutableRefObject<T>;
1313
-export declare const useCsvParser: () => MutableRefObject<typeof import("csv-parse")>;
14-
-//# sourceMappingURL=index.d.ts.map
15-
\ No newline at end of file
14+
-//# sourceMappingURL=index.d.ts.map
15+
\ No newline at end of file
1616
+export declare const useCsvParser: invalid;
1717
+//# sourceMappingURL=index.d.ts.map
1818
+/// [Errors] ////
@@ -45,5 +45,5 @@
4545
+ const parserRef = useRef<typeof import("csv-parse")>(null);
4646
+ return parserRef;
4747
+ };
48-
+
49-
\ No newline at end of file
48+
+
49+
\ No newline at end of file

tests/baselines/reference/isolated-declarations/auto-fixed/diff/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts.diff

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
// [[Reason: TODO File is not auto-fixed]] ////
1+
// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] ////
22

33
//// [tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -1,5 +1,42 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -1,5 +1,42 @@
99

1010

1111
//// [index.d.ts]
1212
-export declare const a: () => Promise<import("inner/private").Thing>;
13-
-//# sourceMappingURL=index.d.ts.map
14-
\ No newline at end of file
13+
-//# sourceMappingURL=index.d.ts.map
14+
\ No newline at end of file
1515
+export declare const a: invalid;
1616
+//# sourceMappingURL=index.d.ts.map
1717
+/// [Errors] ////
@@ -50,5 +50,5 @@
5050
+ "default": "./other.js"
5151
+ }
5252
+ }
53-
+ }
54-
\ No newline at end of file
53+
+ }
54+
\ No newline at end of file

tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModuleReexportFromDottedPath.d.ts.diff

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
// [[Reason: TODO File is not auto-fixed]] ////
1+
// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] ////
22

33
//// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -1,7 +1,31 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -1,7 +1,31 @@
99

1010

1111
//// [/index.d.ts]
1212
-import { PrismaClient } from "@prisma/client";
1313
-declare const _default: PrismaClient<import(".prisma/client").PrismaClientOptions>;
1414
+declare const _default: invalid;
1515
export default _default;
16-
\ No newline at end of file
17-
-//# sourceMappingURL=index.d.ts.map
16+
\ No newline at end of file
17+
-//# sourceMappingURL=index.d.ts.map
1818
+//# sourceMappingURL=index.d.ts.map
1919
+/// [Errors] ////
2020
+
@@ -40,5 +40,5 @@
4040
+ export default new EnhancedPrisma();
4141
+ ~~~~~~~~~~~~~~~~~~~~
4242
+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit.
43-
+
44-
\ No newline at end of file
43+
+
44+
\ No newline at end of file

0 commit comments

Comments
 (0)