Reputation: 12025
As is known TypeScript does not support multiple inheritance.
What is approach to use instead, definitely it can be composition. Also to apply builder pattern?
Upvotes: 0
Views: 85
Reputation:
Typescript is a superset of JavaScript. Its main purpose is to provide type savety as JavaScript itself doesn‘t care about this issue.
JavaScript is incomparable to C++, C# or Java when it comes to inheritance.
To sum it up: Yes, composition is the better way to go here.
Upvotes: 1