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