1 import { Disposable } from './disposable';
3 * Represents a typed event.
5 export interface Event<T> {
8 * @param listener The listener function will be call when the event happens.
9 * @param thisArgs The 'this' which will be used when calling the event listener.
10 * @param disposables An array to which a {{IDisposable}} will be added. The
13 (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable;
15 export declare namespace Event {
16 const None: Event<any>;
18 export interface EmitterOptions {
19 onFirstListenerAdd?: Function;
20 onLastListenerRemove?: Function;
22 export declare class Emitter<T> {
27 constructor(_options?: EmitterOptions | undefined);
29 * For the public to allow to subscribe
30 * to events from this Emitter
32 get event(): Event<T>;
34 * To be kept private to fire an event to