TypeScript/tests/baselines/reference/contextualTyping19.types

19 lines
744 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/contextualTyping19.ts ===
var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, {id:2}];
2015-04-13 23:01:57 +02:00
>foo : { id: number; }[], Symbol(foo, Decl(contextualTyping19.ts, 0, 3))
>id : number, Symbol(id, Decl(contextualTyping19.ts, 0, 9))
2014-08-15 23:33:16 +02:00
>[{id:1}] : { id: number; }[]
>{id:1} : { id: number; }
2015-04-13 23:01:57 +02:00
>id : number, Symbol(id, Decl(contextualTyping19.ts, 0, 27))
2015-04-13 21:36:11 +02:00
>1 : number
2014-08-15 23:33:16 +02:00
>foo = [{id:1}, {id:2}] : { id: number; }[]
2015-04-13 23:01:57 +02:00
>foo : { id: number; }[], Symbol(foo, Decl(contextualTyping19.ts, 0, 3))
2014-08-15 23:33:16 +02:00
>[{id:1}, {id:2}] : { id: number; }[]
>{id:1} : { id: number; }
2015-04-13 23:01:57 +02:00
>id : number, Symbol(id, Decl(contextualTyping19.ts, 0, 43))
2015-04-13 21:36:11 +02:00
>1 : number
2014-08-15 23:33:16 +02:00
>{id:2} : { id: number; }
2015-04-13 23:01:57 +02:00
>id : number, Symbol(id, Decl(contextualTyping19.ts, 0, 51))
2015-04-13 21:36:11 +02:00
>2 : number
2014-08-15 23:33:16 +02:00