You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this eliminate the need to maintain TYPES object if every interface was replaced with an abstract class? Are there any downsides to using this approach?
I was looking for an IOC container for Typescript that allows usage of abstract classes like this.
Unless I haven't seen it it's not specified in the npm doc that abstract classes can be used as identifiers.
Maybe this could be worth mentioning it, as it simplifies a lot compared to maintaining TYPES.
Extending
ServiceIdentifier<T>
to accept Abstract classes.Constructor of abstract class can be used as service identifier and can also be binded to a concret implementation.
And such way should be more easier than injecting an interface, which need to define a symbol for it.
This was reported by https://github.com/inversify/inversify-dts/pull/19
The text was updated successfully, but these errors were encountered: