/** * event can only use {data} to pass information */ export interface UseEventBusEvent { type: string; data: unknown; } export declare type UseEventBusEventHandler = (e: UseEventBusEvent) => void; /** * @returns functions to listen and emit events */ export declare function useEventBus(): { on: (type: string, handler: UseEventBusEventHandler) => void; off: (type: string, handler: UseEventBusEventHandler) => void; once: (type: string, handler: UseEventBusEventHandler) => void; emit: (type: string, data: unknown) => void; };