Validador de Estructura JSON Anidada

Dificultad: Difícil TypeScript advanced coding
type DeepPartial<T> = { [K in keyof T]?: DeepPartial<T[K]> };
const validar = async <T>(esquema: T, datos: DeepPartial<T>): Promise<boolean> => 
  Object.keys(esquema).every(k => k in datos && typeof datos[k] === typeof esquema[k]);

const resultado = await validar({ id: 0, nombre: "", activo: true }, { id: 42, nombre: "Ana" });
📥 Inputs:
esquema = { id: 0, nombre: "", activo: true } datos = { id: 42, nombre: "Ana" }
❓ ¿Cuál es el output?
Ingresa tu respuesta abajo