34 lines
559 B
Text
34 lines
559 B
Text
|
=== 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 = {};
|
||
|
>this.listeners = {} : { [x: string]: Callback; }
|
||
|
>this.listeners : IMap
|
||
|
>this : Emitter
|
||
|
>listeners : IMap
|
||
|
>{} : { [x: string]: Callback; }
|
||
|
}
|
||
|
}
|
||
|
|