/
host-implements-hasInvalidatedResolution.js
273 lines (209 loc) · 9.98 KB
/
host-implements-hasInvalidatedResolution.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
Input::
//// [/user/username/projects/myproject/tsconfig.json]
{"compilerOptions":{"traceResolution":true,"extendedDiagnostics":true},"files":["main.ts"]}
//// [/user/username/projects/myproject/main.ts]
import { foo } from "./other";
//// [/user/username/projects/myproject/other.d.ts]
export function foo(): void;
//// [/a/lib/lib.d.ts]
/// <reference no-default-lib="true"/>
interface Boolean {}
interface Function {}
interface CallableFunction {}
interface NewableFunction {}
interface IArguments {}
interface Number { toExponential: any; }
interface Object {}
interface RegExp {}
interface String { charAt: any; }
interface Array<T> { length: number; [n: number]: T; }
/a/lib/tsc.js --w
Output::
>> Screen clear
[[90m12:00:23 AM[0m] Starting compilation in watch mode...
Current directory: /user/username/projects/myproject CaseSensitiveFileNames: false
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Config file
Synchronizing program
CreatingProgramWith::
roots: ["/user/username/projects/myproject/main.ts"]
options: {"traceResolution":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/main.ts 250 undefined Source file
======== Resolving module './other' from '/user/username/projects/myproject/main.ts'. ========
Module resolution kind is not specified, using 'NodeJs'.
Loading module as file / folder, candidate module location '/user/username/projects/myproject/other', target file type 'TypeScript'.
File '/user/username/projects/myproject/other.ts' does not exist.
File '/user/username/projects/myproject/other.tsx' does not exist.
File '/user/username/projects/myproject/other.d.ts' exist - use it as a name resolution result.
======== Module name './other' was successfully resolved to '/user/username/projects/myproject/other.d.ts'. ========
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/other.d.ts 250 undefined Source file
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 250 undefined Source file
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
[[90m12:00:26 AM[0m] Found 0 errors. Watching for file changes.
Program root files: ["/user/username/projects/myproject/main.ts"]
Program options: {"traceResolution":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: Not
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/other.d.ts
/user/username/projects/myproject/main.ts
Semantic diagnostics in builder refreshed for::
/a/lib/lib.d.ts
/user/username/projects/myproject/other.d.ts
/user/username/projects/myproject/main.ts
Shape signatures in builder refreshed for::
/a/lib/lib.d.ts (used version)
/user/username/projects/myproject/other.d.ts (used version)
/user/username/projects/myproject/main.ts (used version)
PolledWatches::
/user/username/projects/myproject/node_modules/@types:
{"pollingInterval":500}
FsWatches::
/user/username/projects/myproject/tsconfig.json:
{}
/user/username/projects/myproject/main.ts:
{}
/user/username/projects/myproject/other.d.ts:
{}
/a/lib/lib.d.ts:
{}
FsWatchesRecursive::
exitCode:: ExitStatus.undefined
//// [/user/username/projects/myproject/main.js]
"use strict";
exports.__esModule = true;
Change:: write other with same contents
Input::
//// [/user/username/projects/myproject/other.d.ts] file changed its modified time
Output::
FileWatcher:: Triggered with /user/username/projects/myproject/other.d.ts 1:: WatchInfo: /user/username/projects/myproject/other.d.ts 250 undefined Source file
Scheduling update
Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/other.d.ts 1:: WatchInfo: /user/username/projects/myproject/other.d.ts 250 undefined Source file
Synchronizing program
[[90m12:00:29 AM[0m] File change detected. Starting incremental compilation...
CreatingProgramWith::
roots: ["/user/username/projects/myproject/main.ts"]
options: {"traceResolution":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
[[90m12:00:30 AM[0m] Found 0 errors. Watching for file changes.
Program root files: ["/user/username/projects/myproject/main.ts"]
Program options: {"traceResolution":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: Completely
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/other.d.ts
/user/username/projects/myproject/main.ts
Semantic diagnostics in builder refreshed for::
No shapes updated in the builder::
PolledWatches::
/user/username/projects/myproject/node_modules/@types:
{"pollingInterval":500}
FsWatches::
/user/username/projects/myproject/tsconfig.json:
{}
/user/username/projects/myproject/main.ts:
{}
/user/username/projects/myproject/other.d.ts:
{}
/a/lib/lib.d.ts:
{}
FsWatchesRecursive::
exitCode:: ExitStatus.undefined
Change:: change other file
Input::
//// [/user/username/projects/myproject/other.d.ts]
export function foo(): void;export function bar(): void;
Output::
FileWatcher:: Triggered with /user/username/projects/myproject/other.d.ts 1:: WatchInfo: /user/username/projects/myproject/other.d.ts 250 undefined Source file
Scheduling update
Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/other.d.ts 1:: WatchInfo: /user/username/projects/myproject/other.d.ts 250 undefined Source file
Synchronizing program
[[90m12:00:33 AM[0m] File change detected. Starting incremental compilation...
CreatingProgramWith::
roots: ["/user/username/projects/myproject/main.ts"]
options: {"traceResolution":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
[[90m12:00:37 AM[0m] Found 0 errors. Watching for file changes.
Program root files: ["/user/username/projects/myproject/main.ts"]
Program options: {"traceResolution":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: Completely
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/other.d.ts
/user/username/projects/myproject/main.ts
Semantic diagnostics in builder refreshed for::
/user/username/projects/myproject/other.d.ts
/user/username/projects/myproject/main.ts
Shape signatures in builder refreshed for::
/user/username/projects/myproject/other.d.ts (used version)
/user/username/projects/myproject/main.ts (computed .d.ts)
PolledWatches::
/user/username/projects/myproject/node_modules/@types:
{"pollingInterval":500}
FsWatches::
/user/username/projects/myproject/tsconfig.json:
{}
/user/username/projects/myproject/main.ts:
{}
/user/username/projects/myproject/other.d.ts:
{}
/a/lib/lib.d.ts:
{}
FsWatchesRecursive::
exitCode:: ExitStatus.undefined
//// [/user/username/projects/myproject/main.js] file written with same contents
Change:: write other with same contents but write ts file
Input::
//// [/user/username/projects/myproject/other.d.ts] file changed its modified time
//// [/user/username/projects/myproject/other.ts]
export function foo() {}
Output::
FileWatcher:: Triggered with /user/username/projects/myproject/other.d.ts 1:: WatchInfo: /user/username/projects/myproject/other.d.ts 250 undefined Source file
Scheduling update
Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/other.d.ts 1:: WatchInfo: /user/username/projects/myproject/other.d.ts 250 undefined Source file
Synchronizing program
[[90m12:00:42 AM[0m] File change detected. Starting incremental compilation...
CreatingProgramWith::
roots: ["/user/username/projects/myproject/main.ts"]
options: {"traceResolution":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
======== Resolving module './other' from '/user/username/projects/myproject/main.ts'. ========
Module resolution kind is not specified, using 'NodeJs'.
Loading module as file / folder, candidate module location '/user/username/projects/myproject/other', target file type 'TypeScript'.
File '/user/username/projects/myproject/other.ts' exist - use it as a name resolution result.
======== Module name './other' was successfully resolved to '/user/username/projects/myproject/other.ts'. ========
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/other.ts 250 undefined Source file
[[90m12:00:48 AM[0m] Found 0 errors. Watching for file changes.
Program root files: ["/user/username/projects/myproject/main.ts"]
Program options: {"traceResolution":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: SafeModules
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/other.ts
/user/username/projects/myproject/main.ts
Semantic diagnostics in builder refreshed for::
/user/username/projects/myproject/other.ts
/user/username/projects/myproject/main.ts
Shape signatures in builder refreshed for::
/user/username/projects/myproject/other.ts (computed .d.ts)
/user/username/projects/myproject/main.ts (computed .d.ts)
PolledWatches::
/user/username/projects/myproject/node_modules/@types:
{"pollingInterval":500}
FsWatches::
/user/username/projects/myproject/tsconfig.json:
{}
/user/username/projects/myproject/main.ts:
{}
/user/username/projects/myproject/other.d.ts:
{}
/a/lib/lib.d.ts:
{}
/user/username/projects/myproject/other.ts:
{}
FsWatchesRecursive::
exitCode:: ExitStatus.undefined
//// [/user/username/projects/myproject/main.js] file written with same contents
//// [/user/username/projects/myproject/other.js]
"use strict";
exports.__esModule = true;
exports.foo = void 0;
function foo() { }
exports.foo = foo;