Get a nested property type from another type.
Section: Type Operators
Use indexed access types
typescript
typescript
type User = { profile: { email: string } };
type Email = User["profile"]["email"];Explanation
Indexed access types help avoid repeating nested object types manually.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Type Operators
Use template literal types
Compose string literal types from smaller pieces.
Constrain a key parameter with `keyof`
Accept only valid property names for a given object type.
Generic identity function
Use a type parameter for reusable function typing.