Skip to content

Commit 2a29880

Browse files
committed
Handle simple lib file in the test case
1 parent d5100bb commit 2a29880

File tree

4 files changed

+25
-28
lines changed

4 files changed

+25
-28
lines changed

tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,9 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex"
3030
{
3131
"program": {
3232
"fileInfos": {
33-
"/lib/lib.es5.d.ts": {
34-
"version": "/lib/lib.es5.d.ts",
35-
"signature": "/lib/lib.es5.d.ts"
36-
},
37-
"/lib/lib.es2015.promise.d.ts": {
38-
"version": "/lib/lib.es2015.promise.d.ts",
39-
"signature": "/lib/lib.es2015.promise.d.ts"
33+
"/lib/lib.d.ts": {
34+
"version": "-15964756381",
35+
"signature": "-15964756381"
4036
},
4137
"/src/bar.ts": {
4238
"version": "747071916",
@@ -46,6 +42,10 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex"
4642
"version": "-21659820217",
4743
"signature": "-40032907372"
4844
},
45+
"/src/global.d.ts": {
46+
"version": "-9780226215",
47+
"signature": "-9780226215"
48+
},
4949
"/src/lazyindex.ts": {
5050
"version": "-6956449754",
5151
"signature": "-6224542381"
@@ -60,10 +60,6 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex"
6060
"declaration": true,
6161
"outDir": "/src/obj",
6262
"incremental": true,
63-
"lib": [
64-
"lib.es5.d.ts",
65-
"lib.es2015.promise.d.ts"
66-
],
6763
"configFilePath": "/src/tsconfig.json"
6864
},
6965
"referencedMap": {
@@ -85,10 +81,10 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex"
8581
]
8682
},
8783
"semanticDiagnosticsPerFile": [
88-
"/lib/lib.es2015.promise.d.ts",
89-
"/lib/lib.es5.d.ts",
84+
"/lib/lib.d.ts",
9085
"/src/bar.ts",
9186
"/src/bundling.ts",
87+
"/src/global.d.ts",
9288
"/src/index.ts",
9389
"/src/lazyindex.ts"
9490
]

tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-Build/inferred-type-from-transitive-module.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,9 @@ exports.bar = bar_1.default;
6868
{
6969
"program": {
7070
"fileInfos": {
71-
"/lib/lib.es5.d.ts": {
72-
"version": "/lib/lib.es5.d.ts",
73-
"signature": "/lib/lib.es5.d.ts"
74-
},
75-
"/lib/lib.es2015.promise.d.ts": {
76-
"version": "/lib/lib.es2015.promise.d.ts",
77-
"signature": "/lib/lib.es2015.promise.d.ts"
71+
"/lib/lib.d.ts": {
72+
"version": "-15964756381",
73+
"signature": "-15964756381"
7874
},
7975
"/src/bar.ts": {
8076
"version": "5936740878",
@@ -84,6 +80,10 @@ exports.bar = bar_1.default;
8480
"version": "-21659820217",
8581
"signature": "-40032907372"
8682
},
83+
"/src/global.d.ts": {
84+
"version": "-9780226215",
85+
"signature": "-9780226215"
86+
},
8787
"/src/lazyindex.ts": {
8888
"version": "-6956449754",
8989
"signature": "-6224542381"
@@ -98,10 +98,6 @@ exports.bar = bar_1.default;
9898
"declaration": true,
9999
"outDir": "/src/obj",
100100
"incremental": true,
101-
"lib": [
102-
"lib.es5.d.ts",
103-
"lib.es2015.promise.d.ts"
104-
],
105101
"configFilePath": "/src/tsconfig.json"
106102
},
107103
"referencedMap": {
@@ -123,10 +119,10 @@ exports.bar = bar_1.default;
123119
]
124120
},
125121
"semanticDiagnosticsPerFile": [
126-
"/lib/lib.es2015.promise.d.ts",
127-
"/lib/lib.es5.d.ts",
122+
"/lib/lib.d.ts",
128123
"/src/bar.ts",
129124
"/src/bundling.ts",
125+
"/src/global.d.ts",
130126
"/src/index.ts",
131127
"/src/lazyindex.ts"
132128
]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
interface PromiseConstructor {
2+
new <T>(): Promise<T>;
3+
}
4+
declare var Promise: PromiseConstructor;
5+
interface Promise<T> {
6+
}

tests/projects/inferredTypeFromTransitiveModule/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"target": "es5",
44
"declaration": true,
55
"outDir": "obj",
6-
"incremental": true,
7-
"lib": ["es5", "es2015.promise"]
6+
"incremental": true
87
}
98
}

0 commit comments

Comments
 (0)