import EmitterListener, { EmitMessage, EmittedMessage, HandlerFunction } from './emitterListener'; export interface ConstructorOptions { wildcardOne?: string; wildcardSome?: string; separator?: string; concurrency?: number; cacheAdds?: boolean; } export interface IteratorEmittedMessage { message: EmittedMessage; context?: TContext; } export interface IteratorResult { done: boolean; value: T; } export interface Iterator { next(value?: any): IteratorResult; return?(value?: any): IteratorResult; throw?(e?: any): IteratorResult; } declare class Emitter { private _matcher; private _concurrency; private _listenerMap; constructor({ wildcardOne, wildcardSome, separator, concurrency, // not used for now cacheAdds, }?: ConstructorOptions); private _removeListener; emit(options: EmitMessage): Promise; addListener(topic: string, handler: HandlerFunction, context?: TContext, once?: boolean): EmitterListener; hasListener(listenerId: string): boolean; hasListener(listener: EmitterListener): boolean; hasListener(topic: string, handler: HandlerFunction): boolean; hasListener(topic: string, handler: HandlerFunction, context: TContext): boolean; removeListener(listenerId: string): void; removeListener(listener: EmitterListener): void; removeListener(topic: string, handler: HandlerFunction): void; removeListener(topic: string, handler: HandlerFunction, context: TContext): void; removeAllListeners(topic: string): void; on(topic: string, handler: HandlerFunction, context?: TContext): EmitterListener; once(topic: string, handler: HandlerFunction, context?: TContext): EmitterListener; off(topic: string, handler: HandlerFunction): void; off(topic: string, handler: HandlerFunction, context: TContext): void; } export default Emitter; //# sourceMappingURL=index.d.ts.map