TypeScript/tests/baselines/reference/typeOfEnumAndVarRedeclarations.errors.txt
2014-09-12 13:35:07 -07:00

16 lines
611 B
Plaintext

tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts(10,41): error TS2375: Duplicate number index signature.
==== tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts (1 errors) ====
enum E {
a
}
enum E {
b = 1
}
var x = E;
var x: { a: E; b: E;[x: number]: string; }; // Shouldnt error
var y = E;
var y: { a: E; b: E;[x: number]: string;[x: number]: string } // two errors: the types are not identical and duplicate signatures
~~~~~~~~~~~~~~~~~~~
!!! error TS2375: Duplicate number index signature.