I am new to nodejs and typescript, coming from C#. I want to use dependency injection in my project and found that the most popular package is inversify.
I started using it but I don't like the fact that I have to add decorators all over.
for example it bothers me that I need to add @inject before parameters in the constructor:
public constructor(
@inject(TYPES.Weapon) katana: Weapon,
@inject(TYPES.ThrowableWeapon) shuriken: ThrowableWeapon
)
This mean every class has to know the TYPES object...
I don't understand why @inject needs the string literal and can't inject just on the basis of the type...
Is there a neater way to do this?