export type EventMapBase = object;
export type EventListener<T> = (event: T) => void;
export type EventErrorHandler = (error: unknown, eventName: string) => void;
export interface Subscription {
    unsubscribe(): void;
}
export declare class EventBus<TEvents extends EventMapBase> {
    private readonly onListenerError?;
    private readonly listeners;
    private readonly onceListeners;
    constructor(onListenerError?: EventErrorHandler | undefined);
    on<K extends keyof TEvents>(eventName: K, listener: EventListener<TEvents[K]>): Subscription;
    once<K extends keyof TEvents>(eventName: K, listener: EventListener<TEvents[K]>): Subscription;
    off<K extends keyof TEvents>(eventName: K, listener: EventListener<TEvents[K]>): void;
    emit<K extends keyof TEvents>(eventName: K, event: TEvents[K]): void;
    clear(): void;
}
//# sourceMappingURL=EventBus.d.ts.map