export declare class EventBus<ListenersT extends Record<string, any> = Record<string, ListenerCallback>, ListenerNameT extends ListenerKeys<ListenersT> = ListenerKeys<ListenersT>> {
    private listeners;
    _dispatch<NameT extends ListenerNameT>(name: NameT, ...data: Parameters<InferCallback<ListenersT, NameT>>): void;
    _on<NameT extends ListenerNameT>(name: NameT, listener: InferCallback<ListenersT, NameT>, options?: ListenerOptions): void;
    _off<NameT extends ListenerNameT>(name: NameT, listener?: InferCallback<ListenersT, NameT>): void;
    dispatch<NameT extends ListenerNameT>(name: NameT, ...data: Parameters<InferCallback<ListenersT, NameT>>): void;
    on<NameT extends ListenerNameT>(name: NameT, listener: InferCallback<ListenersT, NameT>, options?: ListenerOptions): void;
    off<NameT extends ListenerNameT>(name: NameT, listener?: InferCallback<ListenersT, NameT>): void;
}
export type ListenerCallback = (...data: any) => Promise<any> | any;
export type ListenerOptions = {
    external?: boolean;
    once?: boolean;
    signal?: AbortSignal;
};
export type ListenerAbort = () => void;
export type Listener = Omit<ListenerOptions, 'signal'> & {
    listener: ListenerCallback;
    rmAbort?: ListenerAbort;
};
export type ListenerKeys<T> = keyof T & string;
export type InferCallback<HT, HN extends keyof HT> = HT[HN] extends ListenerCallback ? HT[HN] : never;
export type Listeners = {
    [eventName: string]: Listener[];
};
