2014-12-06 01:58:49 +01:00
|
|
|
tests/cases/compiler/numericIndexerConstraint2.ts(4,1): error TS2322: Type '{ one: number; }' is not assignable to type '{ [index: string]: Foo; }'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Index signature is missing in type '{ one: number; }'.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/numericIndexerConstraint2.ts (1 errors) ====
|
|
|
|
class Foo { foo() { } }
|
|
|
|
var x: { [index: string]: Foo; };
|
|
|
|
var a: { one: number; };
|
|
|
|
x = a;
|
|
|
|
~
|
2014-12-06 01:58:49 +01:00
|
|
|
!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [index: string]: Foo; }'.
|
2014-11-05 21:26:03 +01:00
|
|
|
!!! error TS2322: Index signature is missing in type '{ one: number; }'.
|