type EventMap = Record<string, (...args: unknown[]) => void>;
/**
 * A Preact hook to publish and subscribe to custom events across components.
 * @returns An object with `emit` and `on` methods.
 */
export declare function useEventBus<T extends EventMap>(): {
    emit: <K extends keyof T>(event: K, ...args: Parameters<T[K]>) => void;
    on: <K extends keyof T>(event: K, handler: T[K]) => () => void;
};
export {};
