POV
POV

Reputation: 12025

What is the approach to use instead of multiple inheritance in TypeScript?

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

Answers (1)

user6749601
user6749601

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

Related Questions