Top 5 TypeScript dependency injection containers

  • Typed Inject : no decorators, not interesting syntax
  • InversifyJS:
    • 9k stars, old (2016) but still maintained a bit.
    • With decorators and dict to export types
    • a bit verbose
  • TypeDI (good)
    • 3k stars, old (2016) but a bit maintained
    • Simple and efficient
    • Class based decorators as well as tokens
  • Tsyringe :
    • from microsoft
    • 3k stars, 2018, still maintained
    • similar to TypeDI
  • NestJS DI container
    • 50k stars
    • recent and still developped
    • a bit more heavy syntax (need to define and App module). But it seems very good