export type Arguments = [T] extends [(...args: infer U) => any] ? U : [T] extends [void] ? [] : [T]; export type EventsT = Record void>; type Callback = (...args: any[]) => void; type EventData = { callback: Callback; ctx?: any; }; export declare class Emitter { e: Map; constructor(); on(event: E, callback: T[E], ctx?: any): this; private _on; once(event: E, callback: T[E], ctx?: any): void; emit(event: E | string, ...args: Arguments | any[]): this | undefined; off(event: E, callback?: T[E]): this | undefined; } export {};