type AsyncSubscriber = (event: T) => Promise | void; type Subscriber = (event: T) => Promise | void; export type AsyncEventSubscription = { unsubscribe: () => void; }; export type EventSubscription = { unsubscribe: () => void; }; export declare class EmitterEvent { readonly id: number; stopped: boolean; propagationStopped: boolean; /** * Stop propagating the event to subsequent event listeners. */ stopPropagation(): void; /** * Signal the emitter that you want to abort. * Subsequent event listeners will still be called. */ stop(): void; } export declare class EventEmitter { protected parent?: EventEmitter | undefined; protected subscribers: Subscriber[]; constructor(parent?: EventEmitter | undefined); subscribe(callback: Subscriber): EventSubscription; emit(event: T): void; hasSubscriptions(): boolean; } export declare class AsyncEventEmitter { protected parent?: AsyncEventEmitter | undefined; protected subscribers: AsyncSubscriber[]; constructor(parent?: AsyncEventEmitter | undefined); subscribe(callback: AsyncSubscriber): AsyncEventSubscription; emit(event: T): Promise; hasSubscriptions(): boolean; } export {}; export declare type __ΩAsyncEventSubscription = any[]; export declare type __ΩEventSubscription = any[];