File: typeGuardOfFormIsType.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 (130 lines) | stat: -rw-r--r-- 5,473 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
=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormIsType.ts ===
class C1 {
>C1 : Symbol(C1, Decl(typeGuardOfFormIsType.ts, 0, 0))

    p1: string;
>p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 0, 10))
}
class C2 {
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 2, 1))

    p2: number;
>p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 3, 10))
}
class D1 extends C1 {
>D1 : Symbol(D1, Decl(typeGuardOfFormIsType.ts, 5, 1))
>C1 : Symbol(C1, Decl(typeGuardOfFormIsType.ts, 0, 0))

    p3: number;
>p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 6, 21))
}
var str: string;
>str : Symbol(str, Decl(typeGuardOfFormIsType.ts, 9, 3))

var num: number;
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 10, 3))

var strOrNum: string | number;
>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormIsType.ts, 11, 3))

function isC1(x: any): x is C1 {
>isC1 : Symbol(isC1, Decl(typeGuardOfFormIsType.ts, 11, 30))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 13, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 13, 14))
>C1 : Symbol(C1, Decl(typeGuardOfFormIsType.ts, 0, 0))

    return true;
}

function isC2(x: any): x is C2 {
>isC2 : Symbol(isC2, Decl(typeGuardOfFormIsType.ts, 15, 1))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 17, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 17, 14))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 2, 1))

    return true;
}

function isD1(x: any): x is D1 {
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 19, 1))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 21, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 21, 14))
>D1 : Symbol(D1, Decl(typeGuardOfFormIsType.ts, 5, 1))

    return true;
}

var c1Orc2: C1 | C2;
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 25, 3))
>C1 : Symbol(C1, Decl(typeGuardOfFormIsType.ts, 0, 0))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 2, 1))

str = isC1(c1Orc2) && c1Orc2.p1; // C1
>str : Symbol(str, Decl(typeGuardOfFormIsType.ts, 9, 3))
>isC1 : Symbol(isC1, Decl(typeGuardOfFormIsType.ts, 11, 30))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 25, 3))
>c1Orc2.p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 0, 10))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 25, 3))
>p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 0, 10))

num = isC2(c1Orc2) && c1Orc2.p2; // C2
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 10, 3))
>isC2 : Symbol(isC2, Decl(typeGuardOfFormIsType.ts, 15, 1))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 25, 3))
>c1Orc2.p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 3, 10))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 25, 3))
>p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 3, 10))

str = isD1(c1Orc2) && c1Orc2.p1; // D1
>str : Symbol(str, Decl(typeGuardOfFormIsType.ts, 9, 3))
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 19, 1))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 25, 3))
>c1Orc2.p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 0, 10))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 25, 3))
>p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 0, 10))

num = isD1(c1Orc2) && c1Orc2.p3; // D1
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 10, 3))
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 19, 1))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 25, 3))
>c1Orc2.p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 6, 21))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 25, 3))
>p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 6, 21))

var c2Ord1: C2 | D1;
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 31, 3))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 2, 1))
>D1 : Symbol(D1, Decl(typeGuardOfFormIsType.ts, 5, 1))

num = isC2(c2Ord1) && c2Ord1.p2; // C2
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 10, 3))
>isC2 : Symbol(isC2, Decl(typeGuardOfFormIsType.ts, 15, 1))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 31, 3))
>c2Ord1.p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 3, 10))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 31, 3))
>p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 3, 10))

num = isD1(c2Ord1) && c2Ord1.p3; // D1
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 10, 3))
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 19, 1))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 31, 3))
>c2Ord1.p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 6, 21))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 31, 3))
>p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 6, 21))

str = isD1(c2Ord1) && c2Ord1.p1; // D1
>str : Symbol(str, Decl(typeGuardOfFormIsType.ts, 9, 3))
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 19, 1))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 31, 3))
>c2Ord1.p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 0, 10))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 31, 3))
>p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 0, 10))

var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1
>r2 : Symbol(r2, Decl(typeGuardOfFormIsType.ts, 35, 3))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 2, 1))
>D1 : Symbol(D1, Decl(typeGuardOfFormIsType.ts, 5, 1))
>isC1 : Symbol(isC1, Decl(typeGuardOfFormIsType.ts, 11, 30))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 31, 3))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 31, 3))