File: destructureComputedProperty.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 (40 lines) | stat: -rw-r--r-- 1,673 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
=== tests/cases/compiler/destructureComputedProperty.ts ===
declare const ab: { n: number } | { n: string };
>ab : Symbol(ab, Decl(destructureComputedProperty.ts, 0, 13))
>n : Symbol(n, Decl(destructureComputedProperty.ts, 0, 19))
>n : Symbol(n, Decl(destructureComputedProperty.ts, 0, 35))

const nameN = "n";
>nameN : Symbol(nameN, Decl(destructureComputedProperty.ts, 1, 5))

const { [nameN]: n } = ab;
>nameN : Symbol(nameN, Decl(destructureComputedProperty.ts, 1, 5))
>n : Symbol(n, Decl(destructureComputedProperty.ts, 2, 7))
>ab : Symbol(ab, Decl(destructureComputedProperty.ts, 0, 13))

class C { private p: number; }
>C : Symbol(C, Decl(destructureComputedProperty.ts, 2, 26))
>p : Symbol(C.p, Decl(destructureComputedProperty.ts, 4, 9))

const nameP = "p";
>nameP : Symbol(nameP, Decl(destructureComputedProperty.ts, 5, 5))

const { "p": p0 } = new C();
>p0 : Symbol(p0, Decl(destructureComputedProperty.ts, 6, 7))
>C : Symbol(C, Decl(destructureComputedProperty.ts, 2, 26))

const { ["p"]: p1 } = new C();
>"p" : Symbol(p1, Decl(destructureComputedProperty.ts, 7, 7))
>p1 : Symbol(p1, Decl(destructureComputedProperty.ts, 7, 7))
>C : Symbol(C, Decl(destructureComputedProperty.ts, 2, 26))

const { [nameP]: p2 } = new C();
>nameP : Symbol(nameP, Decl(destructureComputedProperty.ts, 5, 5))
>p2 : Symbol(p2, Decl(destructureComputedProperty.ts, 8, 7))
>C : Symbol(C, Decl(destructureComputedProperty.ts, 2, 26))

const { p: p3 } = new C();
>p : Symbol(C.p, Decl(destructureComputedProperty.ts, 4, 9))
>p3 : Symbol(p3, Decl(destructureComputedProperty.ts, 9, 7))
>C : Symbol(C, Decl(destructureComputedProperty.ts, 2, 26))