Open kbirger opened 6 years ago
@kbirger I don't see why this can't be done. Would you like to make a PR?
@kbirger Awesome PR !!! Thanks a lot! Looks like it was a lot of work! #124
@remojansen will probably release it sometime today
Thanks @AltekkeE, it's no trouble.
@kbirger very good PR thanks a lot :100:
I noticed that the inversify-express-utils package allows the use of decorators that automatically get picked up by the container during the server initialization via the use of the reflect-metadata package. This is very convenient because you don't need to pass on your container to different classes.
The inversify-binding-decorators package follows a pattern of importing a factory, passing it your container, and generating a decorator. This seems clunky and adds a smell to the code.
Would it not be possible to update the package to work similar to inversify-express-utils? To keep the packages decoupled, there could be a function on the binding-decorators package like bindProviders(container), which you call from your resolution root, which then traverses all the registered @provide decorators and binds them.
Context
As of right now, this package doesn't add much value to me, since I don't want to pass my container around to each class which uses a provider.