/** A mutable ref container so we can swap handler identity without rebinding. */ export interface HandlerRef { current: T | undefined; } /** Tracks a single bound event — its cleanup fn and handler ref for swapping. */ export interface BoundEntry { handler: Function; cleanup: () => void; handlerRef?: HandlerRef; } /** * Bind a single event listener on any EventTarget (element, window, document). * Uses a stable wrapper + handlerRef so the handler can be swapped on re-render * without touching the DOM listener. */ export declare function bindEvent(target: EventTarget, eventName: string, handler: Function): BoundEntry; export declare function unbindEntry(entry: BoundEntry): void; export declare function unbindAll(entries: Map): void; /** * Sync a map of event handlers onto a target element. * * - First-time keys: bound via `bindEvent` * - Existing keys with changed handler: handler ref is swapped, no rebind * - Keys removed from the map: unbound and deleted from entries * * Returns the updated entries map (same reference, mutated in place). */ export declare function syncEvents(target: EventTarget, events: Record, entries: Map): void; //# sourceMappingURL=eventBinding.d.ts.map