type HOC
= (Component: React.ComponentType
) => React.ComponentType = () => Promise<{ default: React.ComponentType }>
const withHoc = (asyncComponent: AsyncComponent , hoc: HOC ) => {
return async () => {
const { default: component } = await asyncComponent();
return { default: hoc(component) };
};
};
export default withHoc;