10 lines
No EOL
592 B
Text
10 lines
No EOL
592 B
Text
tests/cases/compiler/numericIndexerConstraint5.ts(2,5): error TS2323: Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }'.
|
|
Index signature is missing in type '{ 0: Date; name: string; }'.
|
|
|
|
|
|
==== tests/cases/compiler/numericIndexerConstraint5.ts (1 errors) ====
|
|
var x = { name: "x", 0: new Date() };
|
|
var z: { [name: number]: string } = x;
|
|
~
|
|
!!! error TS2323: Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }'.
|
|
!!! error TS2323: Index signature is missing in type '{ 0: Date; name: string; }'. |