TypeScript/tests/baselines/reference/numericIndexerConstraint2.errors.txt
2014-09-11 16:11:08 -07:00

8 lines
357 B
Plaintext

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