Can someone suggest a simple dependency injection library for TypeScript/JavaScript?

This page summarizes the projects mentioned and recommended in the original post on /r/typescript

SurveyJS - JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor
Add the SurveyJS white-label form builder to your JavaScript app (React/Angular/Vue3). Build complex JSON forms without coding. Fully customizable, works with any backend, perfect for data-heavy apps. Learn more.
surveyjs.io
featured
Civic Auth - Auth in Less Than 5 Minutes
Civic Auth comes with multiple SSO options, optional embedded wallets, and user management — all implemented with just a few lines of code. Start building today.
www.civic.com
featured
  1. tsyringe

    Lightweight dependency injection container for JavaScript/TypeScript

    Coming from a mostly Java background and using Spring often I was curious to try out DI in node on a personal project. I found tsyringe made by Microsoft to be pretty easy to use https://github.com/microsoft/tsyringe

  2. SurveyJS

    JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor. Add the SurveyJS white-label form builder to your JavaScript app (React/Angular/Vue3). Build complex JSON forms without coding. Fully customizable, works with any backend, perfect for data-heavy apps. Learn more.

    SurveyJS logo
  3. koin

    Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform

    I've been using Angular a lot and I like how it works. I'm also a huge fan of koin for kotlin.

  4. awilix

    Extremely powerful Inversion of Control (IoC) container for Node.JS

    I used awilix in several project, seems good enough for us, no problem so far. https://github.com/jeffijoe/awilix

  5. diod

    A very opinionated inversion of control (IoC) container and dependency injector for Typescript, Node.js or browser apps. (by artberri)

    I will suggest DIOD https://github.com/artberri/diod which is specially designed for Typescript, although it can be used with vanilla JS also.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Typesafe, (almost) Zero Cost Dependency Injection in TypeScript

    12 projects | dev.to | 9 Jan 2023
  • Top 5 TypeScript dependency injection containers

    6 projects | dev.to | 29 Jul 2021
  • Stop Spaghetti Code! How Clean Architecture Saves Next.js Projects

    2 projects | dev.to | 2 May 2025
  • Framework-Level DI Even for student Node.js Developers

    1 project | dev.to | 25 Mar 2025
  • InversifyJS VS vorarbeiter - a user suggested alternative

    2 projects | 2 Feb 2025

Did you know that TypeScript is
the 1st most popular programming language
based on number of references?