We just saw how to implement an inheritance in JavaScript using a prototype. Now, we will see how an inheritance can be implemented in TypeScript, which is basically ES6 inheritance.
In TypeScript, similar to extending interfaces, we can also extend a class by inheriting another class, as follows: