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