KnisterPeter / tsdi

Dependency Injection container (IoC) for TypeScript

Home Page:https://tsdi.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tsdi

Github Workflow npm GitHub license codecov renovate badge

Easy dependency injection for TypeScript.

Features

  • Type based dependency injection
  • Type auto registration
  • Lifecycle methods
  • Constructor parameters injection
  • Singletons and Instances
  • External components (components not managed by tsdi)
  • Scopes

Installation

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.

Documentation

See https://tsdi.js.org/

Contributors ✨

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

About

Dependency Injection container (IoC) for TypeScript

https://tsdi.js.org/

License:MIT License


Languages

Language:TypeScript 80.0%Language:JavaScript 19.3%Language:CSS 0.3%Language:HTML 0.2%Language:Shell 0.1%