dolittle / JavaScript.SDK

Dolittle JavaScript SDK
https://dolittle.io
MIT License
5 stars 2 forks source link

Change all interfaces to abstract classes. #49

Closed joelhoisko closed 3 years ago

joelhoisko commented 3 years ago

Summary

Changes all interface types to abstract class. Their naming stays the same, as we're still using them like interfaces. The reason for the change is to enable the use of dependency-injection frameworks for TS/JS for developers. Transpiling TS -> JS strips away all the interfaces, leaving the DI framework with no token to associate with the type. Changing them to abstract classes generates empty classes (that must not be instantiated in JS), that can be used as binding tokens.

Changed