// // the type refer to: // => https://github.com/developit/mitt/blob/main/src/index.ts // => https://github.com/Tencent/wujie/blob/cdc4e3d923620bdc441823da636e41cb47621ded/docs/api/bus.md // // ooops! maybe it support [Symbol] export type EventType = string export type CallbackResponse = void export declare type EventObj = { [event: string]: Array } export type Handler = (event: T) => void export declare interface EventBus> { $on(event: Key, fn: Handler): CallbackResponse $once(event: Key, fn: Handler): CallbackResponse $off(event: Key, fn?: Handler): CallbackResponse $offAll(fn: Function): CallbackResponse $emit(type: Key, event?: Events[Key]): CallbackResponse $clear(): CallbackResponse }