Solución
solution.tsTypeScript
export function getPrototypeChain(value: unknown): string[] {
const result: string[] = [];
let current = Object.getPrototypeOf(value);
while (current !== null) {
const name =
current.constructor?.name || 'Object';
result.push(name);
current = Object.getPrototypeOf(current);
}
return result;
}0respuestas