import { type Attributes, type ForwardRefExoticComponent, type ForwardRefRenderFunction, type PropsWithoutRef, type RefCallback, type RefObject } from 'react'; /** * From React 19+, The `Ref` type include `RefObject` instead of `RefObject`, * which make some of our components/hooks incompatible with React 18. * * @see https://react.dev/blog/2024/04/25/react-19-upgrade-guide#useref-requires-argument */ type CompatibleRef = RefCallback | RefObject | null; type CompatibleRefAttributes = { ref?: CompatibleRef | undefined; } & Attributes; type CompatibleForwardRef = (render: ForwardRefRenderFunction>) => ForwardRefExoticComponent & CompatibleRefAttributes>; /** * A forwardRef function that is compatible with both React 18 and 19+. */ export declare const compatibleForwardRef: CompatibleForwardRef; export {};