TypeScript tutorialLesson 11Free preview
TS Aliases & Interfaces
This lesson is part of TypeScript · All levels
Summary
Type alias gives other names to any type, including unions and objects. Interface defines a contract as a property and method that an object or class must satisfy. The two are often used together, and the interface supports declaration merging whereas type alias do not.
Key points
- Type to name any type
- Interface describes the object contract
- The interface can be redeclared to merge
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.