TypeScript/tests/baselines/reference/contextualTyping11.errors.txt
2014-09-11 16:11:08 -07:00

6 lines
400 B
Plaintext

==== tests/cases/compiler/contextualTyping11.ts (1 errors) ====
class foo { public bar:{id:number;}[] = [<foo>({})]; }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'foo[]' is not assignable to type '{ id: number; }[]':
!!! error TS2322: Type 'foo' is not assignable to type '{ id: number; }':
!!! error TS2322: Property 'id' is missing in type 'foo'.