import hoistNonReactStatics from "hoist-non-react-statics"; export function withStatics, S = {}>( component: C, statics?: S ): C & S { return hoistNonReactStatics(component, statics as any) as any; }