export declare type Function = (...args: any[]) => any; export declare class EventBus { _events: Map; static _instance: InstanceType; /** * 获取EventBus实例 * @return {EventBus} */ static getInstance(): EventBus; /** * EventBus.getEvents * @return {Map} */ static getEvents(): Map; static getEventsSize(): number; static getEvent(name: string): any; static hasEvent(name: string): boolean; static deleteEvent(name: string): boolean; /** * Method EventBus.setEvent * @param name * @param callback * @return {Map} */ static setEvent(name: string, callback: CallableFunction): Map; /** * Method EventBus.on as EventBus.setEvent * 绑定事件 * @param name * @param callback * @return {Map<*, *>} */ static on(name: string, callback: CallableFunction): Map; /** * Method EventBus.emit * 执行事件 * @param name * @param payload * @return {*} */ static emit(name: string, ...payload: any[]): any; /** * Method EventBus.once * 执行事件并关闭事件 * @param name * @param payload */ static once(name: string, ...payload: any[]): void; /** * EventBus.off * 关闭事件 * @param name * @return {boolean} */ static off(name: string): boolean; }