type EventName = string; declare class Emitter { private e; private generateCallbackId; on(name: EventName, callback: () => void, ctx?: any): () => this; once(name: string, // EventName inlined as string callback: (...args: any[]) => void, ctx?: any): () => this; emit(name: EventName, ...data: any[]): this; off(name: EventName, callbackOrId?: (() => void) | string, ctx?: any): this; } export default Emitter;