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-07-19 02:30:06 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }':
|
|
|
|
!!! error TS2322: Property 'a' is missing in type '{ b: number; }'.
|