Solución
solution.tsTypeScript
function invertirObjeto(obj: Record<string, string>): Record<string, string> {
let ob =Object.fromEntries(
Object.entries(obj).map(([key, value]) => [value, key])
)
return ob;
}
// No modificar: necesario para evaluar el resultado.
export { invertirObjeto };0respuestas