12 lines
324 B
Plaintext
12 lines
324 B
Plaintext
|
=== tests/cases/compiler/contextualTyping9.ts ===
|
||
|
var foo:{id:number;}[] = [{id:1}, {id:2, name:"foo"}];
|
||
|
>foo : { id: number; }[]
|
||
|
>id : number
|
||
|
>[{id:1}, {id:2, name:"foo"}] : { id: number; }[]
|
||
|
>{id:1} : { id: number; }
|
||
|
>id : number
|
||
|
>{id:2, name:"foo"} : { id: number; name: string; }
|
||
|
>id : number
|
||
|
>name : string
|
||
|
|