File: typeGuardsWithInstanceOfByConstructorSignature.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (505 lines) | stat: -rw-r--r-- 24,796 bytes parent folder | download | duplicates (5)
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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
=== tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstructorSignature.ts ===
interface AConstructor {
>AConstructor : Symbol(AConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 0, 0))

    new (): A;
>A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11))
}
interface A {
>A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11))

    foo: string;
>foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 3, 13))
}
declare var A: AConstructor;
>A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11))
>AConstructor : Symbol(AConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 0, 0))

var obj1: A | string;
>obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 8, 3))
>A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11))

if (obj1 instanceof A) { // narrowed to A.
>obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 8, 3))
>A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11))

    obj1.foo;
>obj1.foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 3, 13))
>obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 8, 3))
>foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 3, 13))

    obj1.bar;
>obj1 : Symbol(obj1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 8, 3))
}

var obj2: any;
>obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 14, 3))

if (obj2 instanceof A) {
>obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 14, 3))
>A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11))

    obj2.foo;
>obj2.foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 3, 13))
>obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 14, 3))
>foo : Symbol(A.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 3, 13))

    obj2.bar;
>obj2 : Symbol(obj2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 14, 3))
}

// a construct signature with generics
interface BConstructor {
>BConstructor : Symbol(BConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 18, 1))

    new <T>(): B<T>;
>T : Symbol(T, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 22, 9))
>B : Symbol(B, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 23, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 27, 11))
>T : Symbol(T, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 22, 9))
}
interface B<T> {
>B : Symbol(B, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 23, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 27, 11))
>T : Symbol(T, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 12))

    foo: T;
>foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16))
>T : Symbol(T, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 12))
}
declare var B: BConstructor;
>B : Symbol(B, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 23, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 27, 11))
>BConstructor : Symbol(BConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 18, 1))

var obj3: B<number> | string;
>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 3))
>B : Symbol(B, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 23, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 27, 11))

if (obj3 instanceof B) { // narrowed to B<number>.
>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 3))
>B : Symbol(B, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 23, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 27, 11))

    obj3.foo = 1;
>obj3.foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16))
>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 3))
>foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16))

    obj3.foo = "str";
>obj3.foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16))
>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 3))
>foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16))

    obj3.bar = "str";
>obj3 : Symbol(obj3, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 29, 3))
}

var obj4: any;
>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 3))

if (obj4 instanceof B) {
>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 3))
>B : Symbol(B, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 23, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 27, 11))

    obj4.foo = "str";
>obj4.foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16))
>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 3))
>foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16))

    obj4.foo = 1;
>obj4.foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16))
>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 3))
>foo : Symbol(B.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 24, 16))

    obj4.bar = "str";
>obj4 : Symbol(obj4, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 36, 3))
}

// has multiple construct signature
interface CConstructor {
>CConstructor : Symbol(CConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 41, 1))

    new (value: string): C1;
>value : Symbol(value, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 45, 9))
>C1 : Symbol(C1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 47, 1))

    new (value: number): C2;
>value : Symbol(value, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 46, 9))
>C2 : Symbol(C2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 52, 1))
}
interface C1 {
>C1 : Symbol(C1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 47, 1))

    foo: string;
>foo : Symbol(C1.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 48, 14))

    c: string;
>c : Symbol(C1.c, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 49, 16))

    bar1: number;
>bar1 : Symbol(C1.bar1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 50, 14))
}
interface C2 {
>C2 : Symbol(C2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 52, 1))

    foo: string;
>foo : Symbol(C2.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 53, 14))

    c: string;
>c : Symbol(C2.c, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 54, 16))

    bar2: number;
>bar2 : Symbol(C2.bar2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 55, 14))
}
declare var C: CConstructor;
>C : Symbol(C, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 58, 11))
>CConstructor : Symbol(CConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 41, 1))

var obj5: C1 | A;
>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 3))
>C1 : Symbol(C1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 47, 1))
>A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11))

if (obj5 instanceof C) { // narrowed to C1|C2.
>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 3))
>C : Symbol(C, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 58, 11))

    obj5.foo;
>obj5.foo : Symbol(C1.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 48, 14))
>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 3))
>foo : Symbol(C1.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 48, 14))

    obj5.c;
>obj5.c : Symbol(C1.c, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 49, 16))
>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 3))
>c : Symbol(C1.c, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 49, 16))

    obj5.bar1;
>obj5.bar1 : Symbol(C1.bar1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 50, 14))
>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 3))
>bar1 : Symbol(C1.bar1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 50, 14))

    obj5.bar2;
>obj5 : Symbol(obj5, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 60, 3))
}

var obj6: any;
>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 3))

if (obj6 instanceof C) {
>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 3))
>C : Symbol(C, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 58, 11))

    obj6.foo;
>obj6.foo : Symbol(foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 48, 14), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 53, 14))
>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 3))
>foo : Symbol(foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 48, 14), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 53, 14))

    obj6.bar1;
>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 3))

    obj6.bar2;
>obj6 : Symbol(obj6, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 68, 3))
}

// with object type literal
interface D {
>D : Symbol(D, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 73, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 79, 11))

    foo: string;
>foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 76, 13))
}
declare var D: { new (): D; };
>D : Symbol(D, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 73, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 79, 11))
>D : Symbol(D, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 73, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 79, 11))

var obj7: D | string;
>obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 81, 3))
>D : Symbol(D, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 73, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 79, 11))

if (obj7 instanceof D) { // narrowed to D.
>obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 81, 3))
>D : Symbol(D, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 73, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 79, 11))

    obj7.foo;
>obj7.foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 76, 13))
>obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 81, 3))
>foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 76, 13))

    obj7.bar;
>obj7 : Symbol(obj7, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 81, 3))
}

var obj8: any;
>obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 87, 3))

if (obj8 instanceof D) {
>obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 87, 3))
>D : Symbol(D, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 73, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 79, 11))

    obj8.foo;
>obj8.foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 76, 13))
>obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 87, 3))
>foo : Symbol(D.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 76, 13))

    obj8.bar;
>obj8 : Symbol(obj8, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 87, 3))
}

// a construct signature that returns a union type
interface EConstructor {
>EConstructor : Symbol(EConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 91, 1))

    new (): E1 | E2;
>E1 : Symbol(E1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 96, 1))
>E2 : Symbol(E2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 100, 1))
}
interface E1 {
>E1 : Symbol(E1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 96, 1))

    foo: string;
>foo : Symbol(E1.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 97, 14))

    bar1: number;
>bar1 : Symbol(E1.bar1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 98, 16))
}
interface E2 {
>E2 : Symbol(E2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 100, 1))

    foo: string;
>foo : Symbol(E2.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 101, 14))

    bar2: number;
>bar2 : Symbol(E2.bar2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 102, 16))
}
declare var E: EConstructor;
>E : Symbol(E, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 105, 11))
>EConstructor : Symbol(EConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 91, 1))

var obj9: E1 | A;
>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 3))
>E1 : Symbol(E1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 96, 1))
>A : Symbol(A, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 2, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 6, 11))

if (obj9 instanceof E) { // narrowed to E1 | E2
>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 3))
>E : Symbol(E, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 105, 11))

    obj9.foo;
>obj9.foo : Symbol(E1.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 97, 14))
>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 3))
>foo : Symbol(E1.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 97, 14))

    obj9.bar1;
>obj9.bar1 : Symbol(E1.bar1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 98, 16))
>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 3))
>bar1 : Symbol(E1.bar1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 98, 16))

    obj9.bar2;
>obj9 : Symbol(obj9, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 107, 3))
}

var obj10: any;
>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 3))

if (obj10 instanceof E) {
>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 3))
>E : Symbol(E, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 105, 11))

    obj10.foo;
>obj10.foo : Symbol(foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 97, 14), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 101, 14))
>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 3))
>foo : Symbol(foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 97, 14), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 101, 14))

    obj10.bar1;
>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 3))

    obj10.bar2;
>obj10 : Symbol(obj10, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 114, 3))
}

// a construct signature that returns any
interface FConstructor {
>FConstructor : Symbol(FConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 119, 1))

    new (): any;
}
interface F {
>F : Symbol(F, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 124, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 129, 11))

    foo: string;
>foo : Symbol(F.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 125, 13))

    bar: number;
>bar : Symbol(F.bar, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 126, 16))
}
declare var F: FConstructor;
>F : Symbol(F, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 124, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 129, 11))
>FConstructor : Symbol(FConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 119, 1))

var obj11: F | string;
>obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 131, 3))
>F : Symbol(F, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 124, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 129, 11))

if (obj11 instanceof F) { // can't type narrowing, construct signature returns any.
>obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 131, 3))
>F : Symbol(F, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 124, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 129, 11))

    obj11.foo;
>obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 131, 3))

    obj11.bar;
>obj11 : Symbol(obj11, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 131, 3))
}

var obj12: any;
>obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 137, 3))

if (obj12 instanceof F) {
>obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 137, 3))
>F : Symbol(F, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 124, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 129, 11))

    obj12.foo;
>obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 137, 3))

    obj12.bar;
>obj12 : Symbol(obj12, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 137, 3))
}

// a type with a prototype, it overrides the construct signature
interface GConstructor {
>GConstructor : Symbol(GConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 141, 1))

    prototype: G1; // high priority
>prototype : Symbol(GConstructor.prototype, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 144, 24))
>G1 : Symbol(G1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 147, 1))

    new (): G2;    // low priority
>G2 : Symbol(G2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 150, 1))
}
interface G1 {
>G1 : Symbol(G1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 147, 1))

    foo1: number;
>foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 148, 14))
}
interface G2 {
>G2 : Symbol(G2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 150, 1))

    foo2: boolean;
>foo2 : Symbol(G2.foo2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 151, 14))
}
declare var G: GConstructor;
>G : Symbol(G, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 154, 11))
>GConstructor : Symbol(GConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 141, 1))

var obj13: G1 | G2;
>obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 156, 3))
>G1 : Symbol(G1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 147, 1))
>G2 : Symbol(G2, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 150, 1))

if (obj13 instanceof G) { // narrowed to G1. G1 is return type of prototype property.
>obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 156, 3))
>G : Symbol(G, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 154, 11))

    obj13.foo1;
>obj13.foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 148, 14))
>obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 156, 3))
>foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 148, 14))

    obj13.foo2;
>obj13 : Symbol(obj13, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 156, 3))
}

var obj14: any;
>obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 162, 3))

if (obj14 instanceof G) {
>obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 162, 3))
>G : Symbol(G, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 154, 11))

    obj14.foo1;
>obj14.foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 148, 14))
>obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 162, 3))
>foo1 : Symbol(G1.foo1, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 148, 14))

    obj14.foo2;
>obj14 : Symbol(obj14, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 162, 3))
}

// a type with a prototype that has any type
interface HConstructor {
>HConstructor : Symbol(HConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 166, 1))

    prototype: any; // high priority, but any type is ignored. interface has implicit `prototype: any`.
>prototype : Symbol(HConstructor.prototype, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 169, 24))

    new (): H;      // low priority
>H : Symbol(H, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 172, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 176, 11))
}
interface H {
>H : Symbol(H, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 172, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 176, 11))

    foo: number;
>foo : Symbol(H.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 173, 13))
}
declare var H: HConstructor;
>H : Symbol(H, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 172, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 176, 11))
>HConstructor : Symbol(HConstructor, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 166, 1))

var obj15: H | string;
>obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 178, 3))
>H : Symbol(H, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 172, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 176, 11))

if (obj15 instanceof H) { // narrowed to H.
>obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 178, 3))
>H : Symbol(H, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 172, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 176, 11))

    obj15.foo;
>obj15.foo : Symbol(H.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 173, 13))
>obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 178, 3))
>foo : Symbol(H.foo, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 173, 13))

    obj15.bar;
>obj15 : Symbol(obj15, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 178, 3))
}

var obj16: any;
>obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 184, 3))

if (obj16 instanceof H) {
>obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 184, 3))
>H : Symbol(H, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 172, 1), Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 176, 11))

    obj16.foo1;
>obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 184, 3))

    obj16.foo2;
>obj16 : Symbol(obj16, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 184, 3))
}

var obj17: any;
>obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 190, 3))

if (obj17 instanceof Object) { // can't narrow type from 'any' to 'Object'
>obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 190, 3))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))

    obj17.foo1;
>obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 190, 3))

    obj17.foo2;
>obj17 : Symbol(obj17, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 190, 3))
}

var obj18: any;
>obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 196, 3))

if (obj18 instanceof Function) { // can't narrow type from 'any' to 'Function'
>obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 196, 3))
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))

    obj18.foo1;
>obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 196, 3))

    obj18.foo2;
>obj18 : Symbol(obj18, Decl(typeGuardsWithInstanceOfByConstructorSignature.ts, 196, 3))
}