30 lines
518 B
TypeScript
30 lines
518 B
TypeScript
// Enum named with PredefinedTypes
|
|
enum any { }
|
|
enum number { }
|
|
enum string { }
|
|
enum boolean { }
|
|
|
|
// Enum with computed member initializer of type Number
|
|
enum E5 {
|
|
C = new Number(30)
|
|
}
|
|
|
|
enum E9 {
|
|
A,
|
|
B = A
|
|
}
|
|
|
|
//Enum with computed member intializer of different enum type
|
|
// Bug 707850: This should be allowed
|
|
enum E10 {
|
|
A = E9.A,
|
|
B = E9.B
|
|
}
|
|
|
|
// Enum with computed member intializer of other types
|
|
enum E11 {
|
|
A = '',
|
|
B = new Date(),
|
|
C = window,
|
|
D = {}
|
|
}
|