type Dictionary = { [P in K]?: T; }; export declare class EventEmitter { _emitDelay: number; _strictMode: boolean; events: T[]; _listeners: Dictionary; /** * @constructor * @param {{}} [opts] * @param {number} [opts.emitDelay = 10] - Number in ms. Specifies whether emit will be sync or async. By default - 10ms. If 0 - fires sync * @param {boolean} [opts.strictMode = false] - is true, Emitter throws error on emit error with no listeners */ constructor(opts?: { emitDelay: number; strictMode: boolean; }); /** * @protected * @param {string} type * @param {function} listener * @param {boolean} [once = false] */ _addListenner(type: T, listener: Function, once: boolean): void; /** * Subscribes on event type specified function * @param {string} type * @param {function} listener */ on(type: T, listener: Function): void; /** * Subscribes on event type specified function to fire only once * @param {string} type * @param {function} listener */ once(type: T, listener: Function): void; /** * Removes event with specified type. If specified listenerFunc - deletes only one listener of specified type * @param {string} eventType * @param {function} [listenerFunc] */ off(eventType: T, listenerFunc: Function): void; /** * Applies arguments to specified event type * @param {string} eventType * @param {*[]} eventArguments * @protected */ _applyEvents(eventType: T, eventArguments: any): void; /** * Emits event with specified type and params. * @param {string} type * @param eventArgs */ emit(type: T, ...eventArgs: any[]): void; /** * Emits event with specified type and params synchronously. * @param {string} type * @param eventArgs */ emitSync(type: T, ...eventArgs: any[]): void; /** * Destroys EventEmitter */ destroy(): void; } export {};