3.2.0 • Published 2 years ago
ts-injection v3.2.0
ts-injection is an annotation based dependency injection framework written in Typescript for NodeJS apps. It enables building applications that have loosely coupled components.
Show me some code
@Injectable()
class ArnyService {
public getQuote(): string {
return "Get to the choppa!";
}
}
@Injectable()
class ArnyApp {
@Autowire(ArnyService)
private service!: ArnyService;
public getQuote(): string {
return this.service.getQuote();
}
}
const container = new InjectionContainer();
function main(): void {
const app = container.resolve(ArnyApp);
console.log(handler.getQuote());
}
Features
- 🌾 Field injection
- 🔨 Constructor injection
- 🔢 Environment variable parsing
View full documentation
3.1.3
2 years ago
3.1.2
2 years ago
3.2.0
2 years ago
3.1.1
2 years ago
3.1.0
2 years ago
3.0.2
2 years ago
3.0.1
2 years ago
3.0.0
2 years ago
2.0.2
2 years ago
2.0.1
2 years ago
2.0.0
2 years ago
1.0.0
3 years ago
1.2.2
3 years ago
1.2.0
3 years ago
1.1.9
3 years ago
1.1.8
3 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago