TypeScript/tests/baselines/reference/numericIndexerConstraint2.errors.txt
2014-07-12 17:30:19 -07:00

8 lines
329 B
Plaintext

==== tests/cases/compiler/numericIndexerConstraint2.ts (1 errors) ====
class Foo { foo() { } }
var x: { [index: string]: Foo; };
var a: { one: number; };
x = a;
~
!!! Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }':
!!! Index signature is missing in type '{ one: number; }'.