import { Disposable } from './disposable'; /** * Represents a typed event. */ export interface Event { /** * * @param listener The listener function will be call when the event happens. * @param thisArgs The 'this' which will be used when calling the event listener. * @param disposables An array to which a {{IDisposable}} will be added. * @return a disposable to remove the listener again. */ (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable; /** * An emitter will print a warning if more listeners are added for this event. * The event.maxListeners allows the limit to be modified for this specific event. * The value can be set to 0 to indicate an unlimited number of listener. */ maxListeners: number; } export declare namespace Event { const None: Event; /** * Given an event and a `map` function, returns another event which maps each element * through the mapping function. */ function map(event: Event, mapFunc: (i: I) => O): Event; } export declare type Callback = (...args: any[]) => any; export declare class CallbackList implements Iterable { private _callbacks; private _contexts; get length(): number; add(callback: Function, context?: any, bucket?: Disposable[]): void; remove(callback: Function, context?: any): void; [Symbol.iterator](): IterableIterator<(...args: any[]) => any>; invoke(...args: any[]): any[]; isEmpty(): boolean; dispose(): void; } //# sourceMappingURL=event.d.ts.map