Typescript – Builder Pattern and Inheritance

Using Typescript, I want to make a class of Builder of abstract class and follow a Builder Pattern and the child class will implement the details.

The parent abstract class:

The child class:

If you notice, you need to change the return of build() function into child class name.

typescript builder pattern and inheritance - child class
typescript builder pattern and inheritance – child class