import { RefAttributes, forwardRef } from "react"; import hoistNonReactStatics from "hoist-non-react-statics"; export function forwardRefWithStatics( component: React.ForwardRefRenderFunction, statics?: S ): React.FunctionComponent

> & S { return hoistNonReactStatics(forwardRef(component), statics as any) as any; }