Abstract Class Methods
Explore how to use abstract class methods in TypeScript to enforce implementation requirements in derived classes. Understand managing inherited method calls with the super keyword and applying this pattern to real-world class hierarchies.
We'll cover the following...
We'll cover the following...
Abstract class methods in TypeScript
An abstract class method is similar to an abstract class in that it is designed to be overridden. In other words, declaring a class method as abstract means that a derived class must provide an implementation of this method. For this reason, abstract class methods are not allowed to provide a function implementation.
As an example of this, let’s update the EmployeeBase class:
Abstract class defining methods and properties
Here, we have added a class method named ...