import React, {ComponentType} from 'react';
export interface AdditionalProps {
additionalProp: string;
}
export function hoc<T extends AdditionalProps>(WrappedComponent: ComponentType<T>) {
const additionalProp = //...
return (hocprops:T)=>{
return (
<WrappedComponent
{...hocprops}
/>
)
}
}