mid-apis
Version:
Apis的中间层,接收数据并上传给服务器
10 lines (9 loc) • 328 B
TypeScript
declare class EventBus {
handlers: Record<string, any>;
constructor();
on(eventName: string, handler: Function): void;
off(eventName: string, handler: Function): void;
trigger(eventName: string, ...args: any[]): void;
once(eventName: string, handler: Function): void;
}
export default EventBus;