/
typeGuardBoolean.symbols
35 lines (29 loc) · 1.33 KB
/
typeGuardBoolean.symbols
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
=== tests/cases/conformance/expressions/typeGuards/typeGuardBoolean.ts ===
function test(strOrNull: string | null, strOrUndefined: string | undefined) {
>test : Symbol(test, Decl(typeGuardBoolean.ts, 0, 0))
>strOrNull : Symbol(strOrNull, Decl(typeGuardBoolean.ts, 0, 14))
>strOrUndefined : Symbol(strOrUndefined, Decl(typeGuardBoolean.ts, 0, 39))
var str: string = "original";
>str : Symbol(str, Decl(typeGuardBoolean.ts, 1, 5))
var nil: null;
>nil : Symbol(nil, Decl(typeGuardBoolean.ts, 2, 5))
if (!Boolean(strOrNull)) {
>Boolean : Symbol(Boolean, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>strOrNull : Symbol(strOrNull, Decl(typeGuardBoolean.ts, 0, 14))
nil = strOrNull;
>nil : Symbol(nil, Decl(typeGuardBoolean.ts, 2, 5))
>strOrNull : Symbol(strOrNull, Decl(typeGuardBoolean.ts, 0, 14))
}
else {
str = strOrNull;
>str : Symbol(str, Decl(typeGuardBoolean.ts, 1, 5))
>strOrNull : Symbol(strOrNull, Decl(typeGuardBoolean.ts, 0, 14))
}
if (Boolean(strOrUndefined)) {
>Boolean : Symbol(Boolean, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>strOrUndefined : Symbol(strOrUndefined, Decl(typeGuardBoolean.ts, 0, 39))
str = strOrUndefined;
>str : Symbol(str, Decl(typeGuardBoolean.ts, 1, 5))
>strOrUndefined : Symbol(strOrUndefined, Decl(typeGuardBoolean.ts, 0, 39))
}
}