import { Ref, RefObject } from 'react'; /** * Merges an internal ref object with a forwarded ref. * Both refs will be updated when the element is mounted/unmounted. * Supports both callback refs and object refs from the parent. * * @param forwardedRef - The ref forwarded from a parent component * @returns A `mergedRef` to be used anywhere a regular ref would be used. * * @example * ```tsx * const MyComponent = forwardRef((props, ref) => { * const mergedRef = useMergedRef(ref); * * useEffect(() => { * if (mergedRef.current) { * mergedRef.current.focus(); * } * }, []); * * // Pass mergedRef to the element * return ; * }); * ``` */ export declare const useMergedRef: (forwardedRef: Ref) => RefObject;