TypeScript/tests/baselines/reference/indexer3.types

15 lines
364 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/indexer3.ts ===
var dateMap: { [x: string]: Date; } = {}
>dateMap : { [x: string]: Date; }
>x : string
>Date : Date
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
>r : Date
>Date : Date
2014-08-15 23:33:16 +02:00
>dateMap["hello"] : Date
>dateMap : { [x: string]: Date; }
2015-04-13 21:36:11 +02:00
>"hello" : string
2014-08-15 23:33:16 +02:00