File: duplicateObjectLiteralProperty_computedName2.types

package info (click to toggle)
node-typescript 5.1.6%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 492,516 kB
  • sloc: javascript: 2,078,951; makefile: 6; sh: 1
file content (86 lines) | stat: -rw-r--r-- 1,251 bytes parent folder | download
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
=== tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts ===
const n = 1;
>n : 1
>1 : 1

const s = "s";
>s : "s"
>"s" : "s"

enum E1 { A = "ENUM_KEY" }
>E1 : E1
>A : E1.A
>"ENUM_KEY" : "ENUM_KEY"

enum E2 { B }
>E2 : E2
>B : E2.B

const t1 = {
>t1 : { 1: number; }
>{    [n]: 1,    [n]: 1, // duplicate} : { 1: number; }

    [n]: 1,
>[n] : number
>n : 1
>1 : 1

    [n]: 1, // duplicate
>[n] : number
>n : 1
>1 : 1
}

const t2 = {
>t2 : { s: number; }
>{    [s]: 1,    [s]: 1, // duplicate} : { s: number; }

    [s]: 1,
>[s] : number
>s : "s"
>1 : 1

    [s]: 1, // duplicate
>[s] : number
>s : "s"
>1 : 1
}

const t3 = {
>t3 : { ENUM_KEY: number; }
>{    [E1.A]: 1,    [E1.A]: 1, // duplicate} : { ENUM_KEY: number; }

    [E1.A]: 1,
>[E1.A] : number
>E1.A : E1
>E1 : typeof E1
>A : E1
>1 : 1

    [E1.A]: 1, // duplicate
>[E1.A] : number
>E1.A : E1
>E1 : typeof E1
>A : E1
>1 : 1
}

const t4 = {
>t4 : { 0: number; }
>{    [E2.B]: 1,    [E2.B]: 1, // duplicate} : { 0: number; }

    [E2.B]: 1,
>[E2.B] : number
>E2.B : E2
>E2 : typeof E2
>B : E2
>1 : 1

    [E2.B]: 1, // duplicate
>[E2.B] : number
>E2.B : E2
>E2 : typeof E2
>B : E2
>1 : 1
}