forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenumMemberNameNonIdentifier.types
More file actions
89 lines (77 loc) · 2.01 KB
/
enumMemberNameNonIdentifier.types
File metadata and controls
89 lines (77 loc) · 2.01 KB
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
//// [tests/cases/compiler/enumMemberNameNonIdentifier.ts] ////
=== enumMemberNameNonIdentifier.ts ===
export const enum E {
>E : E
> : ^
regular = 0,
>regular : E.regular
> : ^^^^^^^^^
>0 : 0
> : ^
"hyphen-member" = 1,
>"hyphen-member" : (typeof E)["hyphen-member"]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>1 : 1
> : ^
"123startsWithNumber" = 2,
>"123startsWithNumber" : (typeof E)["123startsWithNumber"]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>2 : 2
> : ^
"has space" = 3,
>"has space" : (typeof E)["has space"]
> : ^^^^^^^^^^^^^^^^^^^^^^^
>3 : 3
> : ^
// Greek Capital Yot (U+037F) - valid identifier in ES2015+ but NOT in ES5
Ϳ = 4,
>Ϳ : E.Ϳ
> : ^^^
>4 : 4
> : ^
}
export const a = E["hyphen-member"];
>a : (typeof E)["hyphen-member"]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>E["hyphen-member"] : (typeof E)["hyphen-member"]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>E : typeof E
> : ^^^^^^^^
>"hyphen-member" : "hyphen-member"
> : ^^^^^^^^^^^^^^^
export const b = E["123startsWithNumber"];
>b : (typeof E)["123startsWithNumber"]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>E["123startsWithNumber"] : (typeof E)["123startsWithNumber"]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>E : typeof E
> : ^^^^^^^^
>"123startsWithNumber" : "123startsWithNumber"
> : ^^^^^^^^^^^^^^^^^^^^^
export const c = E["has space"];
>c : (typeof E)["has space"]
> : ^^^^^^^^^^^^^^^^^^^^^^^
>E["has space"] : (typeof E)["has space"]
> : ^^^^^^^^^^^^^^^^^^^^^^^
>E : typeof E
> : ^^^^^^^^
>"has space" : "has space"
> : ^^^^^^^^^^^
export const d = E.regular;
>d : E.regular
> : ^^^^^^^^^
>E.regular : E.regular
> : ^^^^^^^^^
>E : typeof E
> : ^^^^^^^^
>regular : E.regular
> : ^^^^^^^^^
export const e = E.Ϳ;
>e : E.Ϳ
> : ^^^
>E.Ϳ : E.Ϳ
> : ^^^
>E : typeof E
> : ^^^^^^^^
>Ϳ : E.Ϳ
> : ^^^