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

9 lines
412 B
Plaintext

==== tests/cases/compiler/assignmentToObject.ts (1 errors) ====
var a = { toString: 5 };
var b: {} = a; // ok
var c: Object = a; // should be error
~
!!! error TS2322: Type '{ toString: number; }' is not assignable to type 'Object':
!!! error TS2322: Types of property 'toString' are incompatible:
!!! error TS2322: Type 'number' is not assignable to type '() => string'.