TypeScript · Generics and utility types
Indexed access
Looks up the type of a property by key. Combine it with keyof for type-safe helpers.
Syntax
T[K]Example
Example
type User = { id: string; age: number };
type Age = User["age"];More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.