TypeScript/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt

10 lines
508 B
Plaintext
Raw Normal View History

2014-11-05 21:26:03 +01:00
tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,5): error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'.
Property 'a' is missing in type '{ b: number; }'.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/objectLitStructuralTypeMismatch.ts (1 errors) ====
// Shouldn't compile
var x: { a: number; } = { b: 5 };
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'.
!!! error TS2322: Property 'a' is missing in type '{ b: number; }'.