3 ms·
I feel like DI frameworks for JavaScript/TypeScript are always too complex, and rely too heavily on decorators to make up for the lack of RTTI. You'd be surpris
by nkohari 11mo ago
I feel like DI frameworks for JavaScript/TypeScript are always too complex, and rely too heavily on decorators to make up for the lack of RTTI. You'd be surprised how far you can get with using string identifiers for dependencies:
https://github.com/nkohari/forge https://github.com/nkohari/forge
(For context: many years ago, I wrote Ninject, one of the more popular DI frameworks for .NET)
- pshirshov 11mo agoIn this particular case decorators are completely optional, you don't have to use them. You can provide metadata at binding DSL level.