injectra
v0.1.3
Published
A custom dependency injection framework for Node.js and TypeScript, covering explicit providers, decorator-based registration, tokens, scopes, singleton and transient lifecycles, dependency graph resolution, circular dependency detection, and container te
Maintainers
Readme
Injectra
Injectra is a small dependency injection framework for Node.js and TypeScript.
The package is in early development. The public API is not stable yet.
Installation
npm install injectraRequirements
Injectra currently targets Node.js 24 or higher.
{
"engines": {
"node": ">=24.0.0"
}
}Usage
Injectra is published as an ESM package.
import { INJECTRA_VERSION } from 'injectra'
console.log(INJECTRA_VERSION)Current public API
At the moment, the package exposes only a minimal public entrypoint:
INJECTRA_VERSIONFuture versions will provide the main dependency injection API:
import { Container, Injectable, Inject, Module } from 'injectra'TypeScript
The package includes TypeScript declarations.
No additional type packages are required.
Decorator metadata
Injectra depends on reflect-metadata.
The package imports it from the public entrypoint, so users do not need to import it manually for the current API.
Future decorator-based APIs may require TypeScript decorator options in the consumer project:
{
"compilerOptions": {
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
}Package format
Injectra is distributed as an ESM package.
import { INJECTRA_VERSION } from 'injectra'CommonJS require() is not supported yet.
License
MIT
