TypeScript/tests/baselines/reference/indexer3.types

15 lines
649 B
Text
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/indexer3.ts ===
var dateMap: { [x: string]: Date; } = {}
2015-04-13 23:01:57 +02:00
>dateMap : { [x: string]: Date; }, Symbol(dateMap, Decl(indexer3.ts, 0, 3))
>x : string, Symbol(x, Decl(indexer3.ts, 0, 16))
>Date : Date, Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
2014-10-13 15:56:58 +02:00
>{} : { [x: string]: undefined; }
2014-08-15 23:33:16 +02:00
var r: Date = dateMap["hello"] // result type includes indexer using BCT
2015-04-13 23:01:57 +02:00
>r : Date, Symbol(r, Decl(indexer3.ts, 1, 3))
>Date : Date, Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
2014-08-15 23:33:16 +02:00
>dateMap["hello"] : Date
2015-04-13 23:01:57 +02:00
>dateMap : { [x: string]: Date; }, Symbol(dateMap, Decl(indexer3.ts, 0, 3))
2015-04-13 21:36:11 +02:00
>"hello" : string
2014-08-15 23:33:16 +02:00