export declare type IRef = IRefObject | IRefCallback; export interface IRefObject { current: T | null; } export declare function isRefObject(value: IRef | undefined | null): value is IRefObject; export declare type IRefCallback = (ref: T | null) => any; export declare function isRefCallback(value: IRef | undefined | null): value is IRefCallback; /** * Assign the given ref to a target, either a React ref object or a callback which takes the ref as its first argument. */ export declare function setRef(refTarget: IRef | undefined | null, ref: T | null): void; /** @deprecated use mergeRefs() instead */ export declare function combineRefs(ref1: IRefCallback, ref2: IRefCallback): IRefCallback; /** * Utility for merging refs into one singular callback ref. * If using in a functional component, would recomend using `useMemo` to preserve function identity. */ export declare function mergeRefs(...refs: Array | null>): IRefCallback; export declare function getRef(ref: T | IRefObject | null): T | null; /** * Creates a ref handler which assigns the ref returned by React for a mounted component to a field on the target object. * The target object is usually a component class. * * If provided, it will also update the given `refProp` with the value of the ref. */ export declare function refHandler(refTargetParent: { [k in K]: T | null; }, refTargetKey: K, refProp?: IRef | undefined | null): IRefCallback;