- Mastering TypeScript 3
- Nathan Rozentals
- 88字
- 2021-07-02 12:42:53
Inheritance
Inheritance is another paradigm that is one of the cornerstones of object-oriented programming. Inheritance means that an object uses another object as its base type, thereby inheriting all of the base object's characteristics, including all properties and functions. Both interfaces and classes can use inheritance. An interface or class that is inherited from is known as the base interface or base class, and the interface or class that does the inheritance is known as the derived interface or derived class. TypeScript implements inheritance using the extends keyword.