Compose interfaces with inheritance.
Section: Objects, Interfaces, and Type Aliases
Extend an interface
typescript
typescript
interface Person {
name: string;
}
interface Employee extends Person {
team: string;
}Explanation
`extends` helps model shared fields without duplication.
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 Objects, Interfaces, and Type Aliases
Define an interface
Use an interface to model a reusable object shape.
Define a type alias
Use a type alias for unions, objects, tuples, or helpers.
Use an index signature
Type dictionary-like objects with dynamic keys.
Initialize tsconfig
Create a starter tsconfig.json in the current project.