6 lines
382 B
Plaintext
6 lines
382 B
Plaintext
==== tests/cases/compiler/contextualTyping21.ts (1 errors) ====
|
|
var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, 1];
|
|
~~~
|
|
!!! error TS2322: Type '{}[]' is not assignable to type '{ id: number; }[]':
|
|
!!! error TS2322: Type '{}' is not assignable to type '{ id: number; }':
|
|
!!! error TS2322: Property 'id' is missing in type '{}'. |