/** * Lightweight typed event emitter with zero dependencies. * * Usage: * ```ts * interface MyEvents { * 'foo': [x: number, y: string]; * 'bar': []; * } * const emitter = new EventEmitter(); * emitter.on('foo', (x, y) => console.log(x, y)); * emitter.emit('foo', 42, 'hello'); * ``` */ export declare class EventEmitter> { private _listeners; on(event: K, fn: (...args: TEvents[K]) => void, context?: unknown): this; once(event: K, fn: (...args: TEvents[K]) => void, context?: unknown): this; off(event: K, fn?: (...args: TEvents[K]) => void, context?: unknown): this; emit(event: K, ...args: TEvents[K]): boolean; private _removeEntry; removeAllListeners(event?: keyof TEvents): this; listenerCount(event: keyof TEvents): number; private _add; } //# sourceMappingURL=EventEmitter.d.ts.map