inversify/InversifyJS ? reverse-engineered prompt

Reverse engineered prompt

Build me a lightweight dependency injection library for JavaScript and Node.js in TypeScript.

I want it to let me register classes and values in a container, then ask for an instance and have its dependencies wired up automatically from the constructor. It should feel friendly to use, support clean object oriented design, and keep runtime overhead low.

Please include the core container API, the ability to bind and resolve dependencies, and a few simple examples that show how a small app would use it. If you need to look up current TypeScript or Node docs online while wiring it up, go ahead.

Also make sure it has solid tests, works well with both TypeScript and JavaScript projects, and is set up like a real open source package with build and release tooling. I’d like the code to be easy to read and maintain, since this is meant to be a serious library for production apps.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab