import { Events } from './events'; /** * 事件派发器 */ export declare class Emitter { events: { [key: string]: CallableFunction[]; }; constructor(events: Events); on(names: K | K[], handler: (args: EventTypes[K]) => boolean | unknown): this; trigger(name: K, params: EventTypes[K]): boolean; bind(name: string): void; exist(name: string): boolean; off(name: K, handler?: (args: EventTypes[K]) => boolean | unknown): void; offAll(): void; }