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
|
|
|
|
>dateMap["hello"] : Date
|
|
|
|
>dateMap : { [x: string]: Date; }
|
|
|
|
|