Solución
solution.tsTypeScript
function filterProperties(obj: Record<string, unknown>, keys: string[]): Record<string, unknown> {
return Object.fromEntries(Object.entries(obj).filter(k => keys.includes(k[0])));
}
// No modificar: necesario para evaluar el resultado.
export { filterProperties };0respuestas