export function omitProps < TProps extends Record < string , any > , TKey extends string > ( props , omit ) { const result = Object . keys ( props ) . reduce ( ( acc , x ) => { if ( ! omit . includes ( x as TKey ) ) { acc [ x as keyof Partial < TProps > ] = props [ x ] ; } return acc ; } , { } ) ; return result as Omit < TProps , TKey > ; }