File: typeGuardOfFormIsType.symbols

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (131 lines) | stat: -rw-r--r-- 5,479 bytes parent folder | download | duplicates (2)
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
=== 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, 1, 10))
}
class C2 {
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 3, 1))

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

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

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

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

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

    return true;
}

function isC2(x: any): x is C2 {
>isC2 : Symbol(isC2, Decl(typeGuardOfFormIsType.ts, 16, 1))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 18, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 18, 14))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 3, 1))

    return true;
}

function isD1(x: any): x is D1 {
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 20, 1))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 22, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 22, 14))
>D1 : Symbol(D1, Decl(typeGuardOfFormIsType.ts, 6, 1))

    return true;
}

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

str = isC1(c1Orc2) && c1Orc2.p1; // C1
>str : Symbol(str, Decl(typeGuardOfFormIsType.ts, 10, 3))
>isC1 : Symbol(isC1, Decl(typeGuardOfFormIsType.ts, 12, 30))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>c1Orc2.p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))

num = isC2(c1Orc2) && c1Orc2.p2; // C2
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 11, 3))
>isC2 : Symbol(isC2, Decl(typeGuardOfFormIsType.ts, 16, 1))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>c1Orc2.p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 4, 10))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 4, 10))

str = isD1(c1Orc2) && c1Orc2.p1; // D1
>str : Symbol(str, Decl(typeGuardOfFormIsType.ts, 10, 3))
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 20, 1))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>c1Orc2.p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))

num = isD1(c1Orc2) && c1Orc2.p3; // D1
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 11, 3))
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 20, 1))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>c1Orc2.p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 7, 21))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 7, 21))

var c2Ord1: C2 | D1;
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 3, 1))
>D1 : Symbol(D1, Decl(typeGuardOfFormIsType.ts, 6, 1))

num = isC2(c2Ord1) && c2Ord1.p2; // C2
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 11, 3))
>isC2 : Symbol(isC2, Decl(typeGuardOfFormIsType.ts, 16, 1))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>c2Ord1.p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 4, 10))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 4, 10))

num = isD1(c2Ord1) && c2Ord1.p3; // D1
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 11, 3))
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 20, 1))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>c2Ord1.p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 7, 21))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 7, 21))

str = isD1(c2Ord1) && c2Ord1.p1; // D1
>str : Symbol(str, Decl(typeGuardOfFormIsType.ts, 10, 3))
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 20, 1))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>c2Ord1.p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))

var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1
>r2 : Symbol(r2, Decl(typeGuardOfFormIsType.ts, 36, 3))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 3, 1))
>D1 : Symbol(D1, Decl(typeGuardOfFormIsType.ts, 6, 1))
>isC1 : Symbol(isC1, Decl(typeGuardOfFormIsType.ts, 12, 30))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))