File: narrowTypeByInstanceof.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 (72 lines) | stat: -rw-r--r-- 3,253 bytes parent folder | download | duplicates (7)
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
=== tests/cases/compiler/narrowTypeByInstanceof.ts ===
    class Match {
>Match : Symbol(Match, Decl(narrowTypeByInstanceof.ts, 0, 0))

        public range(): any {
>range : Symbol(Match.range, Decl(narrowTypeByInstanceof.ts, 0, 17))

            return undefined;
>undefined : Symbol(undefined)
        }
    }

    class FileMatch {
>FileMatch : Symbol(FileMatch, Decl(narrowTypeByInstanceof.ts, 4, 5))

        public resource(): any {
>resource : Symbol(FileMatch.resource, Decl(narrowTypeByInstanceof.ts, 6, 21))

            return undefined;
>undefined : Symbol(undefined)
        }
    }

type FileMatchOrMatch = FileMatch | Match;
>FileMatchOrMatch : Symbol(FileMatchOrMatch, Decl(narrowTypeByInstanceof.ts, 10, 5))
>FileMatch : Symbol(FileMatch, Decl(narrowTypeByInstanceof.ts, 4, 5))
>Match : Symbol(Match, Decl(narrowTypeByInstanceof.ts, 0, 0))


let elementA: FileMatchOrMatch, elementB: FileMatchOrMatch;
>elementA : Symbol(elementA, Decl(narrowTypeByInstanceof.ts, 15, 3))
>FileMatchOrMatch : Symbol(FileMatchOrMatch, Decl(narrowTypeByInstanceof.ts, 10, 5))
>elementB : Symbol(elementB, Decl(narrowTypeByInstanceof.ts, 15, 31))
>FileMatchOrMatch : Symbol(FileMatchOrMatch, Decl(narrowTypeByInstanceof.ts, 10, 5))

if (elementA instanceof FileMatch && elementB instanceof FileMatch) {
>elementA : Symbol(elementA, Decl(narrowTypeByInstanceof.ts, 15, 3))
>FileMatch : Symbol(FileMatch, Decl(narrowTypeByInstanceof.ts, 4, 5))
>elementB : Symbol(elementB, Decl(narrowTypeByInstanceof.ts, 15, 31))
>FileMatch : Symbol(FileMatch, Decl(narrowTypeByInstanceof.ts, 4, 5))

    let a = elementA.resource().path;
>a : Symbol(a, Decl(narrowTypeByInstanceof.ts, 18, 7))
>elementA.resource : Symbol(FileMatch.resource, Decl(narrowTypeByInstanceof.ts, 6, 21))
>elementA : Symbol(elementA, Decl(narrowTypeByInstanceof.ts, 15, 3))
>resource : Symbol(FileMatch.resource, Decl(narrowTypeByInstanceof.ts, 6, 21))

    let b = elementB.resource().path;
>b : Symbol(b, Decl(narrowTypeByInstanceof.ts, 19, 7))
>elementB.resource : Symbol(FileMatch.resource, Decl(narrowTypeByInstanceof.ts, 6, 21))
>elementB : Symbol(elementB, Decl(narrowTypeByInstanceof.ts, 15, 31))
>resource : Symbol(FileMatch.resource, Decl(narrowTypeByInstanceof.ts, 6, 21))

} else if (elementA instanceof Match && elementB instanceof Match) {
>elementA : Symbol(elementA, Decl(narrowTypeByInstanceof.ts, 15, 3))
>Match : Symbol(Match, Decl(narrowTypeByInstanceof.ts, 0, 0))
>elementB : Symbol(elementB, Decl(narrowTypeByInstanceof.ts, 15, 31))
>Match : Symbol(Match, Decl(narrowTypeByInstanceof.ts, 0, 0))

    let a = elementA.range();
>a : Symbol(a, Decl(narrowTypeByInstanceof.ts, 21, 7))
>elementA.range : Symbol(Match.range, Decl(narrowTypeByInstanceof.ts, 0, 17))
>elementA : Symbol(elementA, Decl(narrowTypeByInstanceof.ts, 15, 3))
>range : Symbol(Match.range, Decl(narrowTypeByInstanceof.ts, 0, 17))

    let b = elementB.range();
>b : Symbol(b, Decl(narrowTypeByInstanceof.ts, 22, 7))
>elementB.range : Symbol(Match.range, Decl(narrowTypeByInstanceof.ts, 0, 17))
>elementB : Symbol(elementB, Decl(narrowTypeByInstanceof.ts, 15, 31))
>range : Symbol(Match.range, Decl(narrowTypeByInstanceof.ts, 0, 17))
}