33 lines
508 B
Text
33 lines
508 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 = {} : {}
|
|
>this.listeners : IMap
|
|
>this : this
|
|
>listeners : IMap
|
|
>{} : {}
|
|
}
|
|
}
|
|
|