Skip to content
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

Document reasons for fixer not generating fixes. #126

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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 {}

Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -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] ////
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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] ////
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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;
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -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<boolean, import("@raymondfeng/pkg2").IdType>;
-//# 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] ////
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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<boolean, import("@raymondfeng/pkg2/dist/secondary").IdType>;
-//# 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] ////
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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<T> {
current: T;
}
export declare function useRef<T>(current: T): MutableRefObject<T>;
-export declare const useCsvParser: () => MutableRefObject<typeof import("csv-parse")>;
-//# 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] ////
Expand Down Expand Up @@ -45,5 +45,5 @@
+ const parserRef = useRef<typeof import("csv-parse")>(null);
+ return parserRef;
+ };
+
\ No newline at end of file
+
\ No newline at end of file
Original file line number Diff line number Diff line change
@@ -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<import("inner/private").Thing>;
-//# 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] ////
Expand Down Expand Up @@ -50,5 +50,5 @@
+ "default": "./other.js"
+ }
+ }
+ }
\ No newline at end of file
+ }
\ No newline at end of file
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// [[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]
-import { PrismaClient } from "@prisma/client";
-declare const _default: PrismaClient<import(".prisma/client").PrismaClientOptions>;
+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] ////
+
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -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] ////
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Loading