tsdi
Easy dependency injection for TypeScript.
- Type based dependency injection
- Type auto registration
- Lifecycle methods
- Constructor parameters injection
- Singletons and Instances
- External components (components not managed by tsdi)
- Scopes
Install as npm package:
$ yarn add tsdi
or
npm install tsdi --save
You need to enable decorator metadata in your tsconfig.json
, which is done by adding the following line:
"emitDecoratorMetadata": true
Otherwise TSDI will not be able to infer the types of some factories and components.
Thanks goes to these wonderful people (emoji key):
Markus Wolf 💻 |
Frederick Gnodtke 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Released under MIT license - (C) 2018 Markus Wolf