export function mapKeys < T extends object > ( obj , mapper ) { return Object . entries ( obj ) . reduce ( ( acc , [ key , value ] ) => { acc [ mapper ( key as keyof T ) ] = value ; return acc ; } , { } ) ; }