Błąd indeksowania obiektu w TS
type Person = { age: number; name: string; alive: boolean };
const key = "age";
type Age = Person[key];
Tough Tortoise
type Person = { age: number; name: string; alive: boolean };
const key = "age";
type Age = Person[key];