@@ -34,7 +34,13 @@ export type MyNominal = Nominal<string, 'MyNominal'>;
34
34
{ "extends" :"../../tsconfig.base.json" , "compilerOptions" :{ "composite" :true } , "references" :[ { "path" :"../common" } ] , "include" :[ "./index.ts" ] }
35
35
36
36
//// [/src/solution/src/subProject2/index.ts]
37
-
37
+ import { MyNominal } from '../subProject/index' ;
38
+ const variable = {
39
+ key : 'value' as MyNominal ,
40
+ } ;
41
+ export function getVar ( ) : keyof typeof variable {
42
+ return 'key' ;
43
+ }
38
44
39
45
//// [/src/solution/src/subProject2/tsconfig.json]
40
46
{ "extends" :"../../tsconfig.base.json" , "compilerOptions" :{ "composite" :true } , "references" :[ { "path" :"../subProject" } ] , "include" :[ "./index.ts" ] }
@@ -67,24 +73,11 @@ Output::
67
73
68
74
[ [ 90 m12 :00 :00 AM [ 0 m ] Building project '/src/solution/src/subProject/tsconfig.json' . . .
69
75
70
- [ 96 msrc / solution / lib / src / common / nominal . d . ts [ 0 m :[ 93 m2 [ 0 m :[ 93 m55 [ 0 m - [ 91 merror [ 0 m [ 90 m TS2304 : [ 0 mCannot find name 'MyNominal' .
71
-
72
- [ 7 m2 [ 0 m export declare type Nominal < T , Name extends string > = MyNominal < T , Name > ;
73
- [ 7 m [ 0 m [ 91 m ~ ~ ~ ~ ~ ~ ~ ~ ~ [ 0 m
74
-
75
- [ 96 msrc / solution / lib / src / common / nominal . d . ts [ 0 m :[ 93 m1 [ 0 m :[ 93 m22 [ 0 m - [ 91 merror [ 0 m [ 90 m TS6053 : [ 0 mFile '/src/src/common/types.d.ts' not found .
76
-
77
- [ 7 m1 [ 0 m /// <reference path="../../../src/common/types.d.ts" />
78
- [ 7 m [ 0 m [ 91 m ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [ 0 m
76
+ [ [ 90 m12 :00 :00 AM [ 0 m ] Project 'src/solution/src/subProject2/tsconfig.json' is out of date because output file 'src/solution/lib/src/subProject2/index.js' does not exist
79
77
80
- [ [ 90 m12 :00 :00 AM [ 0 m ] Project ' src/solution/src/subProject2/tsconfig.json' can 't be built because its dependency ' src / solution / src / subProject ' has errors
78
+ [ [ 90 m12 :00 :00 AM [ 0 m ] Building project '/ src/solution/src/subProject2/tsconfig.json'. . .
81
79
82
- [ [ 90 m12 :00 :00 AM [ 0 m ] Skipping build of project '/src/solution/src/subProject2/tsconfig.json' because its dependency '/src/solution/src/subProject' has errors
83
-
84
-
85
- Found 2 errors .
86
-
87
- exitCode :: ExitStatus . DiagnosticsPresent_OutputsGenerated
80
+ exitCode :: ExitStatus . Success
88
81
89
82
90
83
//// [/src/solution/lib/src/common/nominal.d.ts]
@@ -139,6 +132,16 @@ exports.__esModule = true;
139
132
"version" : "FakeTSVersion"
140
133
}
141
134
135
+ //// [/src/solution/lib/src/subProject/index.d.ts]
136
+ import { Nominal } from '. . / common / nominal ';
137
+ export declare type MyNominal = Nominal < string , 'MyNominal' > ;
138
+
139
+
140
+ //// [/src/solution/lib/src/subProject/index.js]
141
+ "use strict" ;
142
+ exports . __esModule = true ;
143
+
144
+
142
145
//// [/src/solution/lib/src/subProject/tsconfig.tsbuildinfo]
143
146
{
144
147
"program" : {
@@ -148,6 +151,11 @@ exports.__esModule = true;
148
151
"signature" : "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };" ,
149
152
"affectsGlobalScope" : true
150
153
} ,
154
+ "../../../src/common/types.d.ts" : {
155
+ "version" : "23815050294-declare type MyNominal<T, Name extends string> = T & {\n specialKey: Name;\n};" ,
156
+ "signature" : "23815050294-declare type MyNominal<T, Name extends string> = T & {\n specialKey: Name;\n};" ,
157
+ "affectsGlobalScope" : true
158
+ } ,
151
159
"../common/nominal.d.ts" : {
152
160
"version" : "-18894149496-/// <reference path=\"../../../src/common/types.d.ts\" />\r\nexport declare type Nominal<T, Name extends string> = MyNominal<T, Name>;\r\n" ,
153
161
"signature" : "-18894149496-/// <reference path=\"../../../src/common/types.d.ts\" />\r\nexport declare type Nominal<T, Name extends string> = MyNominal<T, Name>;\r\n" ,
@@ -183,30 +191,96 @@ exports.__esModule = true;
183
191
} ,
184
192
"semanticDiagnosticsPerFile" : [
185
193
"../../../../../lib/lib.d.ts" ,
186
- [
187
- "../common/nominal.d.ts" ,
188
- [
189
- {
190
- "file" : "../common/nominal.d.ts" ,
191
- "start" : 111 ,
192
- "length" : 9 ,
193
- "messageText" : "Cannot find name 'MyNominal'." ,
194
- "category" : 1 ,
195
- "code" : 2304
196
- }
197
- ]
198
- ] ,
194
+ "../common/nominal.d.ts" ,
195
+ "../../../src/common/types.d.ts" ,
199
196
"../../../src/subproject/index.ts"
200
- ] ,
201
- "affectedFilesPendingEmit" : [
202
- [
203
- "../common/nominal.d.ts" ,
204
- 1
197
+ ]
198
+ } ,
199
+ "version" : "FakeTSVersion"
200
+ }
201
+
202
+ //// [/src/solution/lib/src/subProject2/index.d.ts]
203
+ declare const variable : {
204
+ key : globalThis . MyNominal < string , "MyNominal" > ;
205
+ } ;
206
+ export declare function getVar ( ) : keyof typeof variable ;
207
+ export { } ;
208
+
209
+
210
+ //// [/src/solution/lib/src/subProject2/index.js]
211
+ "use strict" ;
212
+ exports . __esModule = true ;
213
+ exports . getVar = void 0 ;
214
+ var variable = {
215
+ key : 'value'
216
+ } ;
217
+ function getVar ( ) {
218
+ return 'key' ;
219
+ }
220
+ exports . getVar = getVar ;
221
+
222
+
223
+ //// [/src/solution/lib/src/subProject2/tsconfig.tsbuildinfo]
224
+ {
225
+ "program" : {
226
+ "fileInfos" : {
227
+ "../../../../../lib/lib.d.ts" : {
228
+ "version" : "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };" ,
229
+ "signature" : "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };" ,
230
+ "affectsGlobalScope" : true
231
+ } ,
232
+ "../../../src/common/types.d.ts" : {
233
+ "version" : "23815050294-declare type MyNominal<T, Name extends string> = T & {\n specialKey: Name;\n};" ,
234
+ "signature" : "23815050294-declare type MyNominal<T, Name extends string> = T & {\n specialKey: Name;\n};" ,
235
+ "affectsGlobalScope" : true
236
+ } ,
237
+ "../common/nominal.d.ts" : {
238
+ "version" : "-18894149496-/// <reference path=\"../../../src/common/types.d.ts\" />\r\nexport declare type Nominal<T, Name extends string> = MyNominal<T, Name>;\r\n" ,
239
+ "signature" : "-18894149496-/// <reference path=\"../../../src/common/types.d.ts\" />\r\nexport declare type Nominal<T, Name extends string> = MyNominal<T, Name>;\r\n" ,
240
+ "affectsGlobalScope" : false
241
+ } ,
242
+ "../subproject/index.d.ts" : {
243
+ "version" : "-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal<string, 'MyNominal'>;\r\n" ,
244
+ "signature" : "-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal<string, 'MyNominal'>;\r\n" ,
245
+ "affectsGlobalScope" : false
246
+ } ,
247
+ "../../../src/subproject2/index.ts" : {
248
+ "version" : "2747033208-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}" ,
249
+ "signature" : "-448645961-declare const variable: {\r\n key: globalThis.MyNominal<string, \"MyNominal\">;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n" ,
250
+ "affectsGlobalScope" : false
251
+ }
252
+ } ,
253
+ "options" : {
254
+ "rootDir" : "../../.." ,
255
+ "outDir" : "../.." ,
256
+ "composite" : true ,
257
+ "configFilePath" : "../../../src/subProject2/tsconfig.json"
258
+ } ,
259
+ "referencedMap" : {
260
+ "../common/nominal.d.ts" : [
261
+ "../../../src/common/types.d.ts"
205
262
] ,
206
- [
207
- "../../../src/subproject/index.ts" ,
208
- 1
263
+ "../subproject/index.d.ts" : [
264
+ "../common/nominal.d.ts"
265
+ ] ,
266
+ "../../../src/subproject2/index.ts" : [
267
+ "../subproject/index.d.ts"
209
268
]
269
+ } ,
270
+ "exportedModulesMap" : {
271
+ "../common/nominal.d.ts" : [
272
+ "../../../src/common/types.d.ts"
273
+ ] ,
274
+ "../subproject/index.d.ts" : [
275
+ "../common/nominal.d.ts"
276
+ ]
277
+ } ,
278
+ "semanticDiagnosticsPerFile" : [
279
+ "../../../../../lib/lib.d.ts" ,
280
+ "../common/nominal.d.ts" ,
281
+ "../subproject/index.d.ts" ,
282
+ "../../../src/common/types.d.ts" ,
283
+ "../../../src/subproject2/index.ts"
210
284
]
211
285
} ,
212
286
"version" : "FakeTSVersion"
0 commit comments