type Person = { age: number; name: string; alive: boolean }; const key = "age"; type Age = Person[key];