File: destructuringObjectBindingPatternAndAssignment7%28target%3Des5%29.types

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (47 lines) | stat: -rw-r--r-- 987 bytes parent folder | download | duplicates (6)
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
=== tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment7.ts ===
enum K {
>K : K

    a = "a",
>a : K.a
>"a" : "a"

    b = "b"
>b : K.b
>"b" : "b"
}
const { [K.a]: aVal, [K.b]: bVal } = (() => {
>K.a : K.a
>K : typeof K
>a : K.a
>aVal : number
>K.b : K.b
>K : typeof K
>b : K.b
>bVal : number
>(() => {	return { [K.a]: 1, [K.b]: 1 };})() : { a: number; b: number; }
>(() => {	return { [K.a]: 1, [K.b]: 1 };}) : () => { a: number; b: number; }
>() => {	return { [K.a]: 1, [K.b]: 1 };} : () => { a: number; b: number; }

	return { [K.a]: 1, [K.b]: 1 };
>{ [K.a]: 1, [K.b]: 1 } : { a: number; b: number; }
>[K.a] : number
>K.a : K.a
>K : typeof K
>a : K.a
>1 : 1
>[K.b] : number
>K.b : K.b
>K : typeof K
>b : K.b
>1 : 1

})();
console.log(aVal, bVal);
>console.log(aVal, bVal) : void
>console.log : (...data: any[]) => void
>console : Console
>log : (...data: any[]) => void
>aVal : number
>bVal : number