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

6 lines
308 B
Text
Raw Normal View History

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