import { Ref } from 'react'; export type ComposableRef = Ref | null | undefined; export type ComposedRef = Extract, (...args: any[]) => any>; /** * Compose all refs to single one. * It's helpful if you want to use useRef alongside a `ref` prop. * * @example * * function Some({ ref, ...props }: SomeProps & RefAttributes) { * const refFromHook = useRef(null); * const composedRef = composeRefs([ref, refFromHook]); * * return ( *
* ... *
* ); * } */ export declare function composeRefs(refs: ComposableRef[]): ComposedRef;