Skip to main content

EventsManager

class EventsManager<T extends EventListenersMap = EventListenersMap> {
getEmitter(): EventEmitter;

on<A extends keyof T>(eventName: A, listener: T[A]): T[A];

off<A extends keyof T>(eventName: A, listener: T[A]): void;

once<A extends keyof T>(eventName: A, listener: T[A]): T[A];

listenerCount<A extends keyof T>(eventName: A): number;

emit<A extends keyof T>(eventName: A, ...args: Parameters<T[A]>): boolean;

removeAllListeners(): void;
}