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