2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/fatArrowSelf.ts ===
|
|
|
|
module Events {
|
2014-08-28 21:40:58 +02:00
|
|
|
>Events : typeof Events
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export interface ListenerCallback {
|
|
|
|
>ListenerCallback : ListenerCallback
|
|
|
|
|
|
|
|
(value:any):void;
|
|
|
|
>value : any
|
|
|
|
}
|
|
|
|
export class EventEmitter {
|
|
|
|
>EventEmitter : EventEmitter
|
|
|
|
|
|
|
|
public addListener(type:string, listener:ListenerCallback) {
|
|
|
|
>addListener : (type: string, listener: ListenerCallback) => void
|
|
|
|
>type : string
|
|
|
|
>listener : ListenerCallback
|
|
|
|
>ListenerCallback : ListenerCallback
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module Consumer {
|
2014-08-28 21:40:58 +02:00
|
|
|
>Consumer : typeof Consumer
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
class EventEmitterConsummer {
|
|
|
|
>EventEmitterConsummer : EventEmitterConsummer
|
|
|
|
|
|
|
|
constructor (private emitter: Events.EventEmitter) { }
|
2014-08-25 19:36:12 +02:00
|
|
|
>emitter : Events.EventEmitter
|
2014-08-28 21:40:58 +02:00
|
|
|
>Events : unknown
|
2014-08-25 19:36:12 +02:00
|
|
|
>EventEmitter : Events.EventEmitter
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
private register() {
|
|
|
|
>register : () => void
|
|
|
|
|
|
|
|
this.emitter.addListener('change', (e) => {
|
2014-08-22 03:39:46 +02:00
|
|
|
>this.emitter.addListener('change', (e) => { this.changed(); }) : void
|
2014-08-25 19:36:12 +02:00
|
|
|
>this.emitter.addListener : (type: string, listener: Events.ListenerCallback) => void
|
|
|
|
>this.emitter : Events.EventEmitter
|
2014-08-15 23:33:16 +02:00
|
|
|
>this : EventEmitterConsummer
|
2014-08-25 19:36:12 +02:00
|
|
|
>emitter : Events.EventEmitter
|
|
|
|
>addListener : (type: string, listener: Events.ListenerCallback) => void
|
2014-08-22 03:39:46 +02:00
|
|
|
>(e) => { this.changed(); } : (e: any) => void
|
2014-08-15 23:33:16 +02:00
|
|
|
>e : any
|
|
|
|
|
|
|
|
this.changed();
|
|
|
|
>this.changed() : void
|
|
|
|
>this.changed : () => void
|
|
|
|
>this : EventEmitterConsummer
|
|
|
|
>changed : () => void
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
private changed() {
|
|
|
|
>changed : () => void
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|