inheritance in Typescript
- TypeScript supports the object or any concept of inheritance,
- TypeScript defines common properties and methods in the superclass.
- in TypeScript the subclasses can extend the superclass and add properties and methods,
- TypeScript also support abstract classes and overriding.
- Typesript support single inheritace
Define Super Class
Define Sub Class
Create an Array of Shapes
Using Parent and Child Class