type EventHandler<T> = (event: T) => void;
/**
 * A simple strongly-typed event emitter.
 *
 * @internal
 *
 * @example
 * ```
 * type MyEvents = {
 *   keydown: KeyboardEvent;
 * };
 * const emitter = new EventEmitter<MyEvents>();
 * emitter.on("keydown", (event) => { ... });
 * emitter.emit("keydown", event);
 * ```
 */
export declare class EventEmitter<Events extends Record<string, unknown>> {
    private listeners;
    /**
     * Register an event handler for a specific event.
     */
    on<K extends keyof Events>(event: K, handler: EventHandler<Events[K]>): void;
    /**
     * Remove a previously registered event handler.
     */
    off<K extends keyof Events>(event: K, handler: EventHandler<Events[K]>): void;
    /**
     * Emit an event, calling all registered handlers with the provided data.
     */
    emit<K extends keyof Events>(event: K, data: Events[K]): void;
}
export {};
//# sourceMappingURL=eventEmitter.d.ts.map