Skip to content

Commit fbd6ce8

Browse files
committed
undo unrelated change
1 parent d24ae2e commit fbd6ce8

File tree

2 files changed

+7
-59
lines changed

2 files changed

+7
-59
lines changed

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2584,7 +2584,7 @@ namespace ts {
25842584
// Stores a mapping 'external module reference text' -> 'resolved file name' | undefined
25852585
// It is used to resolve module names in the checker.
25862586
// Content of this field should never be used directly - use getResolvedModuleFileName/setResolvedModuleFileName functions instead
2587-
/* @internal */ resolvedModules: Map<ResolvedModuleFull>;
2587+
/* @internal */ resolvedModules: Map<ResolvedModuleFull | undefined>;
25882588
/* @internal */ resolvedTypeReferenceDirectiveNames: Map<ResolvedTypeReferenceDirective>;
25892589
/* @internal */ imports: ReadonlyArray<StringLiteralLike>;
25902590
// Identifier only if `declare global`

tests/baselines/reference/importTypeGenericTypes.js

Lines changed: 6 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,12 @@ declare class Bar<T> {
101101
}
102102
export { Bar };
103103
//// [usage.d.ts]
104-
export declare const x: import("./foo");
105-
export declare let y: import("./foo2").Bar.I;
104+
export declare const x: import("./foo")<{
105+
x: number;
106+
}>;
107+
export declare let y: import("./foo2").Bar.I<{
108+
x: number;
109+
}>;
106110
export declare class Bar2<T> {
107111
item: {
108112
a: string;
@@ -113,59 +117,3 @@ export declare class Bar2<T> {
113117
constructor(input?: any);
114118
}
115119
export declare let shim: typeof import("./foo2");
116-
117-
118-
//// [DtsFileErrors]
119-
120-
121-
tests/cases/conformance/types/import/usage.d.ts(1,25): error TS2314: Generic type 'Point<T>' requires 1 type argument(s).
122-
tests/cases/conformance/types/import/usage.d.ts(2,23): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
123-
124-
125-
==== tests/cases/conformance/types/import/foo.d.ts (0 errors) ====
126-
interface Point<T> {
127-
x: number;
128-
y: number;
129-
data: T;
130-
}
131-
export = Point;
132-
133-
==== tests/cases/conformance/types/import/foo2.d.ts (0 errors) ====
134-
declare namespace Bar {
135-
interface I<T> {
136-
a: string;
137-
b: number;
138-
data: T;
139-
}
140-
}
141-
export declare namespace Baz {
142-
interface J<T> {
143-
a: number;
144-
b: string;
145-
data: T;
146-
}
147-
}
148-
declare class Bar<T> {
149-
item: Bar.I<T>;
150-
constructor(input: Baz.J<T>);
151-
}
152-
export { Bar };
153-
154-
==== tests/cases/conformance/types/import/usage.d.ts (2 errors) ====
155-
export declare const x: import("./foo");
156-
~~~~~~~~~~~~~~~
157-
!!! error TS2314: Generic type 'Point<T>' requires 1 type argument(s).
158-
export declare let y: import("./foo2").Bar.I;
159-
~~~~~~~~~~~~~~~~~~~~~~
160-
!!! error TS2314: Generic type 'I<T>' requires 1 type argument(s).
161-
export declare class Bar2<T> {
162-
item: {
163-
a: string;
164-
b: number;
165-
c: object;
166-
data: T;
167-
};
168-
constructor(input?: any);
169-
}
170-
export declare let shim: typeof import("./foo2");
171-

0 commit comments

Comments
 (0)