param handledProps param props returns function getUnhandledProps < P extends Record < string , any > > ( handledProps , props ) { return Object . keys ( props ) . reduce < Partial < P > > ( ( acc , prop ) => { if ( handledProps . indexOf ( prop ) === - 1 ) ( acc as any ) [ prop ] = props [ prop ] ; return acc ; } , { } ) ; } export default getUnhandledProps ;