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 in an forwardRef component. * * @example * * const Some = forwardRef((props, ref) => { * const refFromHook = useRef(null); * const composedRef = composeRefs([ref, refFromHook]); * * return ( *
* ... *
* ); * }); */ export declare function composeRefs(refs: ComposableRef[]): ComposedRef;