UNPKG

500 BTypeScriptView Raw
1/// <reference types="react" />
2export declare type DOMContainer<T extends HTMLElement = HTMLElement> = T | React.RefObject<T> | null | (() => T | React.RefObject<T> | null);
3export declare const resolveContainerRef: <T extends HTMLElement>(ref: DOMContainer<T> | undefined) => HTMLBodyElement | T | null;
4export default function useWaitForDOMRef<T extends HTMLElement = HTMLElement>(ref: DOMContainer<T> | undefined, onResolved?: (element: T | HTMLBodyElement) => void): HTMLBodyElement | T | null;