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
|
tests/cases/compiler/augmentedTypesEnum2.ts(2,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
tests/cases/compiler/augmentedTypesEnum2.ts(4,11): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
tests/cases/compiler/augmentedTypesEnum2.ts(11,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
tests/cases/compiler/augmentedTypesEnum2.ts(12,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
==== tests/cases/compiler/augmentedTypesEnum2.ts (4 errors) ====
// enum then interface
enum e1 { One } // error
~~
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
interface e1 { // error
~~
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
foo(): void;
}
// interface then enum works
// enum then class
enum e2 { One }; // error
~~
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
class e2 { // error
~~
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
foo() {
return 1;
}
}
//enum then enum - covered
//enum then import - covered
|