14 lines
367 B
Text
14 lines
367 B
Text
=== 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
|
|
>1 : number
|
|
>{id:2, name:"foo"} : { id: number; name: string; }
|
|
>id : number
|
|
>2 : number
|
|
>name : string
|
|
>"foo" : string
|
|
|