import React from 'react' ; const identity = < T extends { } > ( ) => ( BaseComponent ) : React . ComponentType < T > => { return ( props ) => { return < BaseComponent { ... props } / > ; } ; } ; export default identity ;