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

6 lines
358 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/contextualTyping11.ts (1 errors) ====
class foo { public bar:{id:number;}[] = [<foo>({})]; }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Type 'foo[]' is not assignable to type '{ id: number; }[]':
!!! Type 'foo' is not assignable to type '{ id: number; }':
!!! Property 'id' is missing in type 'foo'.