32 lines
1.3 KiB
Plaintext
32 lines
1.3 KiB
Plaintext
=== tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts ===
|
|
interface I { global: string; }
|
|
>I : I, Symbol(I, Decl(typeGuardsWithInstanceOf.ts, 0, 0))
|
|
>global : string, Symbol(global, Decl(typeGuardsWithInstanceOf.ts, 0, 13))
|
|
|
|
var result: I;
|
|
>result : I, Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3))
|
|
>I : I, Symbol(I, Decl(typeGuardsWithInstanceOf.ts, 0, 0))
|
|
|
|
var result2: I;
|
|
>result2 : I, Symbol(result2, Decl(typeGuardsWithInstanceOf.ts, 2, 3))
|
|
>I : I, Symbol(I, Decl(typeGuardsWithInstanceOf.ts, 0, 0))
|
|
|
|
if (!(result instanceof RegExp)) {
|
|
>!(result instanceof RegExp) : boolean
|
|
>(result instanceof RegExp) : boolean
|
|
>result instanceof RegExp : boolean
|
|
>result : I, Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3))
|
|
>RegExp : RegExpConstructor, Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11))
|
|
|
|
result = result2;
|
|
>result = result2 : I
|
|
>result : I, Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3))
|
|
>result2 : I, Symbol(result2, Decl(typeGuardsWithInstanceOf.ts, 2, 3))
|
|
|
|
} else if (!result.global) {
|
|
>!result.global : boolean
|
|
>result.global : string, Symbol(I.global, Decl(typeGuardsWithInstanceOf.ts, 0, 13))
|
|
>result : I, Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3))
|
|
>global : string, Symbol(I.global, Decl(typeGuardsWithInstanceOf.ts, 0, 13))
|
|
}
|