10 lines
No EOL
508 B
Text
10 lines
No EOL
508 B
Text
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; }'.
|
|
|
|
|
|
==== 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; }'. |