import type { EventMap, CustomEventMap } from "../types/EventEmitter"; import type { PopsType } from "../types/main"; declare class EventEmiter { [Symbol.toStringTag]: string; type: PopsType; data: Map IPromise; }[]>; constructor(type: PopsType); on

(eventName: P, callback: EventMap[P]): { off: () => IPromise; emit: (...args: Parameters) => IPromise; }; on

(eventName: P, callback: T[P]): { off: () => IPromise; emit: (...args: Parameters) => IPromise; }; off

(eventName: P, callback: EventMap[P]): IPromise; off

(eventName: P, callback: T[P]): IPromise; emit

(eventName: P, ...args: Parameters): IPromise; emit

(eventName: P, ...args: Parameters): IPromise; offAll

(eventName?: P): IPromise; offAll

(eventName?: P): IPromise; /** * 获取所有添加的事件 */ getAllEvents(eventName?: string): { type: PopsType; time: number; callback: (...args: any[]) => IPromise; }[] | { type: PopsType; time: number; callback: (...args: any[]) => IPromise; }[][] | undefined; } export { EventEmiter };