import { RefObject } from 'react'; /** * A hook for safely adding event listeners to DOM elements, with proper cleanup and handler updates. * @param target The target element to attach the listener to (can be a ref, Window, Document, HTMLElement) * @param type The event type to listen for * @param handler The event handler function * @param options Event listener options */ export declare function useEventListener(target: Window | Document | HTMLElement | RefObject | null | undefined, type: K | string, handler: (e: any) => void, options?: boolean | AddEventListenerOptions): void;