export type EventHandler<T> = (event: T) => void;
export type EventBus<Events extends Record<string, unknown>> = {
    on<Name extends keyof Events & string>(name: Name, handler: EventHandler<Events[Name]>): () => void;
    once<Name extends keyof Events & string>(name: Name, handler: EventHandler<Events[Name]>): () => void;
    emit<Name extends keyof Events & string>(name: Name, event: Events[Name]): void;
};
export declare function createEventBus<Events extends Record<string, unknown>>(): EventBus<Events>;
//# sourceMappingURL=event-bus.d.ts.map