@@ -30,7 +30,7 @@ export const theNum: TheNum2 = "type2";
30
30
declare type TheNum = "type1" ;
31
31
32
32
//// [/src/packages/typeroot2/sometype/index.d.ts]
33
-
33
+ declare type TheNum2 = "type2" ;
34
34
35
35
36
36
@@ -54,18 +54,13 @@ Resolving real path for '/src/packages/typeroot1/sometype/index.d.ts', result '/
54
54
55
55
[ [ 90 m12 :00 :00 AM [ 0 m ] Building project '/src/packages/pkg2.tsconfig.json' . . .
56
56
57
- === = === = Resolving type reference directive 'sometype' , containing file '/src/packages/__inferred type names__.ts' . = === = ===
58
- Resolution for type reference directive 'sometype' was found in cache from location '/src/packages' .
59
- = === === = Type reference directive 'sometype' was successfully resolved to '/src/packages/typeroot1/sometype/index.d.ts' , primary : true . = === = ===
60
- [ 96 msrc / packages / pkg2_index . ts [ 0 m :[ 93 m1 [ 0 m :[ 93 m22 [ 0 m - [ 91 merror [ 0 m [ 90 m TS2304 : [ 0 mCannot find name 'TheNum2' .
61
-
62
- [ 7 m1 [ 0 m export const theNum : TheNum2 = "type2" ;
63
- [ 7 m [ 0 m [ 91 m ~ ~ ~ ~ ~ ~ ~ [ 0 m
64
-
65
-
66
- Found 1 error .
67
-
68
- exitCode :: ExitStatus . DiagnosticsPresent_OutputsGenerated
57
+ === = === = Resolving type reference directive 'sometype' , containing file '/src/packages/__inferred type names__.ts' , root directory '/src/packages/typeroot2' . = === = ===
58
+ Resolving with primary search path '/src/packages/typeroot2' .
59
+ File '/src/packages/typeroot2/sometype/package.json' does not exist .
60
+ File '/src/packages/typeroot2/sometype/index.d.ts' exist - use it as a name resolution result .
61
+ Resolving real path for '/src/packages/typeroot2/sometype/index.d.ts' , result '/src/packages/typeroot2/sometype/index.d.ts' .
62
+ = === === = Type reference directive 'sometype' was successfully resolved to '/src/packages/typeroot2/sometype/index.d.ts' , primary : true . = === = ===
63
+ exitCode :: ExitStatus . Success
69
64
70
65
71
66
//// [/src/packages/pkg1.tsconfig.tsbuildinfo]
@@ -123,15 +118,15 @@ exports.theNum = "type1";
123
118
124
119
125
120
//// [/src/packages/pkg2.tsconfig.tsbuildinfo]
126
- { "program" :{ "fileNames" :[ "../../lib/lib.d.ts" , "./pkg2_index.ts" , "./typeroot1/sometype/index.d.ts" ] , "fileInfos" :[ { "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; };" , "affectsGlobalScope" :true } , "-12823281204-export const theNum: TheNum2 = \"type2\";" , { "version" :"-4557394441-declare type TheNum = \"type1\";" , "affectsGlobalScope" :true } ] , "options" :{ "composite" :true } , "referencedMap" :[ ] , "exportedModulesMap" :[ ] , "semanticDiagnosticsPerFile" :[ 1 , [ 2 , [ { "file" :"./pkg2_index.ts" , "start" :21 , "length" :7 , "messageText" :"Cannot find name 'TheNum2'." , "category" :1 , "code" :2304 } ] ] , 3 ] , "affectedFilesPendingEmit" :[ [ 2 , 1 ] , [ 3 , 1 ] ] } , "version" :"FakeTSVersion" }
121
+ { "program ":{ "fileNames ":[ "../../lib/lib.d.ts" , "./pkg2_index.ts" , "./typeroot2/sometype/index.d.ts" ] , "fileInfos" :[ { "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; };" , "affectsGlobalScope" :true } , "-12823281204-export const theNum: TheNum2 = \"type2\";" , { "version" :"-980425686-declare type TheNum2 = \"type2\";" , "affectsGlobalScope" :true } ] , "options" :{ "composite" :true } , "referencedMap" :[ ] , "exportedModulesMap" :[ ] , "semanticDiagnosticsPerFile" :[ 1 , 2 , 3 ] } , "version" :"FakeTSVersion" }
127
122
128
123
//// [/src/packages/pkg2.tsconfig.tsbuildinfo.readable.baseline.txt]
129
124
{
130
125
"program" : {
131
126
"fileNames" : [
132
127
"../../lib/lib.d.ts" ,
133
128
"./pkg2_index.ts" ,
134
- "./typeroot1 /sometype/index.d.ts"
129
+ "./typeroot2 /sometype/index.d.ts"
135
130
] ,
136
131
"fileInfos" : {
137
132
"../../lib/lib.d.ts" : {
@@ -143,9 +138,9 @@ exports.theNum = "type1";
143
138
"version" : "-12823281204-export const theNum: TheNum2 = \"type2\";" ,
144
139
"signature" : "-12823281204-export const theNum: TheNum2 = \"type2\";"
145
140
} ,
146
- "./typeroot1 /sometype/index.d.ts" : {
147
- "version" : "-4557394441 -declare type TheNum = \"type1 \";" ,
148
- "signature" : "-4557394441 -declare type TheNum = \"type1 \";" ,
141
+ "./typeroot2 /sometype/index.d.ts" : {
142
+ "version" : "-980425686 -declare type TheNum2 = \"type2 \";" ,
143
+ "signature" : "-980425686 -declare type TheNum2 = \"type2 \";" ,
149
144
"affectsGlobalScope" : true
150
145
}
151
146
} ,
@@ -156,33 +151,23 @@ exports.theNum = "type1";
156
151
"exportedModulesMap" : { } ,
157
152
"semanticDiagnosticsPerFile" : [
158
153
"../../lib/lib.d.ts" ,
159
- [
160
- "./pkg2_index.ts" ,
161
- [
162
- {
163
- "file" : "./pkg2_index.ts" ,
164
- "start" : 21 ,
165
- "length" : 7 ,
166
- "messageText" : "Cannot find name 'TheNum2'." ,
167
- "category" : 1 ,
168
- "code" : 2304
169
- }
170
- ]
171
- ] ,
172
- "./typeroot1/sometype/index.d.ts"
173
- ] ,
174
- "affectedFilesPendingEmit" : [
175
- [
176
- "./pkg2_index.ts" ,
177
- "Full"
178
- ] ,
179
- [
180
- "./typeroot1/sometype/index.d.ts" ,
181
- "Full"
182
- ]
154
+ "./pkg2_index.ts" ,
155
+ "./typeroot2/sometype/index.d.ts"
183
156
]
184
157
} ,
185
158
"version" : "FakeTSVersion" ,
186
- "size" : 1033
159
+ "size" : 870
187
160
}
188
161
162
+ //// [/src/packages/pkg2_index.d.ts]
163
+ /// <reference types="sometype" />
164
+ export declare const theNum : TheNum2 ;
165
+
166
+
167
+ //// [/src/packages/pkg2_index.js]
168
+ "use strict ";
169
+ exports . __esModule = true ;
170
+ exports . theNum = void 0 ;
171
+ exports . theNum = "type2" ;
172
+
173
+
0 commit comments