import { Ref } from 'react'; type OptRef = Ref | undefined; /** * Compose two or more refs into a single callback ref. Returns `null` if all inputs are nullish, * or the lone non-nullish ref when only one is provided. * * Composed callbacks are cached pairwise in a WeakMap keyed by the input refs, so repeated calls * with the same inputs return the same callback identity - preserving referential stability across * renders without requiring callers to wrap in `useMemo` / `useCallback`. * * Adapted from the (now unmaintained) `@seznam/compose-react-refs` package by Seznam.cz, * https://github.com/seznam/compose-react-refs - MIT licensed. * * TODO (React 19): forward ref-callback cleanup returns and add a `useComposedRefs` hook variant * (using `useCallback`) so callers no longer rely on this util's WeakMap caching for stability. */ export declare function composeRefs(...refs: [OptRef, OptRef, ...Array>]): Ref; export {};