2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/objectIndexer.ts ===
|
|
|
|
export interface Callback {
|
|
|
|
>Callback : Callback
|
|
|
|
|
|
|
|
(value: any): void;
|
|
|
|
>value : any
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IMap {
|
|
|
|
>IMap : IMap
|
|
|
|
|
|
|
|
[s: string]: Callback;
|
|
|
|
>s : string
|
|
|
|
>Callback : Callback
|
|
|
|
}
|
|
|
|
|
|
|
|
class Emitter {
|
|
|
|
>Emitter : Emitter
|
|
|
|
|
|
|
|
private listeners: IMap;
|
|
|
|
>listeners : IMap
|
|
|
|
>IMap : IMap
|
|
|
|
|
|
|
|
constructor () {
|
|
|
|
this.listeners = {};
|
2014-10-13 15:56:58 +02:00
|
|
|
>this.listeners = {} : { [x: string]: undefined; }
|
2014-08-15 23:33:16 +02:00
|
|
|
>this.listeners : IMap
|
|
|
|
>this : Emitter
|
|
|
|
>listeners : IMap
|
2014-10-13 15:56:58 +02:00
|
|
|
>{} : { [x: string]: undefined; }
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|