UNPKG

rooks

Version:

Collection of awesome react hooks

5 lines (4 loc) 538 B
import type { ListenerOptions } from "../types/utils"; declare function useGlobalObjectEventListener(globalObject: Document | undefined, eventName: keyof DocumentEventMap, callback: EventListener, listenerOptions: ListenerOptions, when: boolean, isLayoutEffect: boolean): void; declare function useGlobalObjectEventListener(globalObject: Window | undefined, eventName: keyof WindowEventMap, callback: EventListener, listenerOptions: ListenerOptions, when: boolean, isLayoutEffect: boolean): void; export { useGlobalObjectEventListener };