File: computedPropertiesInDestructuring1_ES6.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 (121 lines) | stat: -rw-r--r-- 6,754 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
=== tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts ===
// destructuring in variable declarations
let foo = "bar";
>foo : Symbol(foo, Decl(computedPropertiesInDestructuring1_ES6.ts, 1, 3))

let {[foo]: bar} = {bar: "bar"};
>foo : Symbol(foo, Decl(computedPropertiesInDestructuring1_ES6.ts, 1, 3))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 2, 5))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 2, 20))

let {["bar"]: bar2} = {bar: "bar"};
>"bar" : Symbol(bar2, Decl(computedPropertiesInDestructuring1_ES6.ts, 4, 5))
>bar2 : Symbol(bar2, Decl(computedPropertiesInDestructuring1_ES6.ts, 4, 5))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 4, 23))

let {[11]: bar2_1} = {11: "bar"};
>11 : Symbol(bar2_1, Decl(computedPropertiesInDestructuring1_ES6.ts, 5, 5))
>bar2_1 : Symbol(bar2_1, Decl(computedPropertiesInDestructuring1_ES6.ts, 5, 5))
>11 : Symbol(11, Decl(computedPropertiesInDestructuring1_ES6.ts, 5, 22))

let foo2 = () => "bar";
>foo2 : Symbol(foo2, Decl(computedPropertiesInDestructuring1_ES6.ts, 7, 3))

let {[foo2()]: bar3} = {bar: "bar"};
>foo2 : Symbol(foo2, Decl(computedPropertiesInDestructuring1_ES6.ts, 7, 3))
>bar3 : Symbol(bar3, Decl(computedPropertiesInDestructuring1_ES6.ts, 8, 5))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 8, 24))

let [{[foo]: bar4}] = [{bar: "bar"}];
>foo : Symbol(foo, Decl(computedPropertiesInDestructuring1_ES6.ts, 1, 3))
>bar4 : Symbol(bar4, Decl(computedPropertiesInDestructuring1_ES6.ts, 10, 6))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 10, 24))

let [{[foo2()]: bar5}] = [{bar: "bar"}];
>foo2 : Symbol(foo2, Decl(computedPropertiesInDestructuring1_ES6.ts, 7, 3))
>bar5 : Symbol(bar5, Decl(computedPropertiesInDestructuring1_ES6.ts, 11, 6))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 11, 27))

function f1({["bar"]: x}: { bar: number }) {}
>f1 : Symbol(f1, Decl(computedPropertiesInDestructuring1_ES6.ts, 11, 40))
>"bar" : Symbol(x, Decl(computedPropertiesInDestructuring1_ES6.ts, 13, 13))
>x : Symbol(x, Decl(computedPropertiesInDestructuring1_ES6.ts, 13, 13))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 13, 27))

function f2({[foo]: x}: { bar: number }) {}
>f2 : Symbol(f2, Decl(computedPropertiesInDestructuring1_ES6.ts, 13, 45))
>foo : Symbol(foo, Decl(computedPropertiesInDestructuring1_ES6.ts, 1, 3))
>x : Symbol(x, Decl(computedPropertiesInDestructuring1_ES6.ts, 14, 13))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 14, 25))

function f3({[foo2()]: x}: { bar: number }) {}
>f3 : Symbol(f3, Decl(computedPropertiesInDestructuring1_ES6.ts, 14, 43))
>foo2 : Symbol(foo2, Decl(computedPropertiesInDestructuring1_ES6.ts, 7, 3))
>x : Symbol(x, Decl(computedPropertiesInDestructuring1_ES6.ts, 15, 13))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 15, 28))

function f4([{[foo]: x}]: [{ bar: number }]) {}
>f4 : Symbol(f4, Decl(computedPropertiesInDestructuring1_ES6.ts, 15, 46))
>foo : Symbol(foo, Decl(computedPropertiesInDestructuring1_ES6.ts, 1, 3))
>x : Symbol(x, Decl(computedPropertiesInDestructuring1_ES6.ts, 16, 14))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 16, 28))

function f5([{[foo2()]: x}]: [{ bar: number }]) {}
>f5 : Symbol(f5, Decl(computedPropertiesInDestructuring1_ES6.ts, 16, 47))
>foo2 : Symbol(foo2, Decl(computedPropertiesInDestructuring1_ES6.ts, 7, 3))
>x : Symbol(x, Decl(computedPropertiesInDestructuring1_ES6.ts, 17, 14))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 17, 31))

// report errors on type errors in computed properties used in destructuring
let [{[foo()]: bar6}] = [{bar: "bar"}];
>foo : Symbol(foo, Decl(computedPropertiesInDestructuring1_ES6.ts, 1, 3))
>bar6 : Symbol(bar6, Decl(computedPropertiesInDestructuring1_ES6.ts, 20, 6))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 20, 26))

let [{[foo.toExponential()]: bar7}] = [{bar: "bar"}];
>foo : Symbol(foo, Decl(computedPropertiesInDestructuring1_ES6.ts, 1, 3))
>bar7 : Symbol(bar7, Decl(computedPropertiesInDestructuring1_ES6.ts, 21, 6))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 21, 40))

// destructuring assignment
({[foo]: bar} = {bar: "bar"});
>[foo] : Symbol([foo], Decl(computedPropertiesInDestructuring1_ES6.ts, 24, 2))
>foo : Symbol(foo, Decl(computedPropertiesInDestructuring1_ES6.ts, 1, 3))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 2, 5))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 24, 17))

({["bar"]: bar2} = {bar: "bar"});
>["bar"] : Symbol(["bar"], Decl(computedPropertiesInDestructuring1_ES6.ts, 26, 2))
>"bar" : Symbol(["bar"], Decl(computedPropertiesInDestructuring1_ES6.ts, 26, 2))
>bar2 : Symbol(bar2, Decl(computedPropertiesInDestructuring1_ES6.ts, 4, 5))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 26, 20))

({[foo2()]: bar3} = {bar: "bar"});
>[foo2()] : Symbol([foo2()], Decl(computedPropertiesInDestructuring1_ES6.ts, 28, 2))
>foo2 : Symbol(foo2, Decl(computedPropertiesInDestructuring1_ES6.ts, 7, 3))
>bar3 : Symbol(bar3, Decl(computedPropertiesInDestructuring1_ES6.ts, 8, 5))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 28, 21))

[{[foo]: bar4}] = [{bar: "bar"}];
>[foo] : Symbol([foo], Decl(computedPropertiesInDestructuring1_ES6.ts, 30, 2))
>foo : Symbol(foo, Decl(computedPropertiesInDestructuring1_ES6.ts, 1, 3))
>bar4 : Symbol(bar4, Decl(computedPropertiesInDestructuring1_ES6.ts, 10, 6))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 30, 20))

[{[foo2()]: bar5}] = [{bar: "bar"}];
>[foo2()] : Symbol([foo2()], Decl(computedPropertiesInDestructuring1_ES6.ts, 31, 2))
>foo2 : Symbol(foo2, Decl(computedPropertiesInDestructuring1_ES6.ts, 7, 3))
>bar5 : Symbol(bar5, Decl(computedPropertiesInDestructuring1_ES6.ts, 11, 6))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 31, 23))

[{[foo()]: bar4}] = [{bar: "bar"}];
>[foo()] : Symbol([foo()], Decl(computedPropertiesInDestructuring1_ES6.ts, 33, 2))
>foo : Symbol(foo, Decl(computedPropertiesInDestructuring1_ES6.ts, 1, 3))
>bar4 : Symbol(bar4, Decl(computedPropertiesInDestructuring1_ES6.ts, 10, 6))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 33, 22))

[{[(1 + {})]: bar4}] = [{bar: "bar"}];
>[(1 + {})] : Symbol([(1 + {})], Decl(computedPropertiesInDestructuring1_ES6.ts, 34, 2))
>bar4 : Symbol(bar4, Decl(computedPropertiesInDestructuring1_ES6.ts, 10, 6))
>bar : Symbol(bar, Decl(computedPropertiesInDestructuring1_ES6.ts, 34, 25))