17 lines
693 B
Text
17 lines
693 B
Text
|
tests/cases/compiler/ambientEnum1.ts(2,9): error TS1066: Ambient enum elements can only have integer literal initializers.
|
||
|
tests/cases/compiler/ambientEnum1.ts(7,9): error TS1066: Ambient enum elements can only have integer literal initializers.
|
||
|
|
||
|
|
||
|
==== tests/cases/compiler/ambientEnum1.ts (2 errors) ====
|
||
|
declare enum E1 {
|
||
|
y = 4.23
|
||
|
~
|
||
|
!!! error TS1066: Ambient enum elements can only have integer literal initializers.
|
||
|
}
|
||
|
|
||
|
// Ambient enum with computer member
|
||
|
declare enum E2 {
|
||
|
x = 'foo'.length
|
||
|
~
|
||
|
!!! error TS1066: Ambient enum elements can only have integer literal initializers.
|
||
|
}
|