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