import { IDisposable } from "./disposable"; /** * Represents a simple pub-sub event. * @typedef T type of the event payload. */ export declare class EventEmitter { private head; private tail; /** * Adds an event listener. * @param listener function that is called when the current event raises. * @param thisArg provides `this` value for the `listener` callback. */ addListener(listener: (this: undefined, arg: T) => void, isAsync?: boolean, thisArg?: undefined): IDisposable; addListener(listener: (this: TThis, arg: T) => void, isAsync: boolean, thisArg: TThis): IDisposable; /** * Raises the event, calling all the event listeners added to this event instance. * @param arg the event payload. */ raise(arg: T): void; /** * Clears all the event listeners. */ clearListeners(): void; } //# sourceMappingURL=eventEmitter.d.ts.map