export type EventMapEmpty = Record; export type EventListener = (data: D) => void; export type Off = () => void; export default function EventBus(): Readonly<{ on: (type: EK, listener: EventListener) => Off; off: (type: EK, listener: EventListener) => void; dispatch: (type: EK, data: EventMap[EK]) => void; }>;