import { RefObject } from 'react'; /** * Calls a handler whenever the Escape key is pressed within an element. To capture * on the entire document, pass null or undefined for the ref. * * @param ref - Ref of the element to capture keystrokes in. Defaults to the document * @param handler - Function called if the escape key is pressed */ export declare function usePressEscapeHandler(ref: RefObject | null | undefined, handler: (e: KeyboardEvent) => any): void; export default usePressEscapeHandler;