DI icon indicating copy to clipboard operation
DI copied to clipboard

A compile-time powered Dependency-Injection container for Typescript that holds services and can produce instances of them as required.

Results 10 DI issues
Sort by recently updated
recently updated
newest added

This pull contains: * Support for the Moddable JavaScript platform. This is the biggest change, as Moddable has a cool but unusual feature where it can run the code at...

Hi - loving DI, using it daily. Great tool, with a really tiny footprint. I've been living in my own fork for a while, though I did (hand merge) your...

DIContainer attempts to invoke an implementation with `new`, and if that throws, it attempts again without new. It has an implicit expectation that if the constructor fails, it will be...

enhancement

Hey, guys, the library uses interface names as tokens and it complicates following to Interface Segregation Princinple. In example: ```ts interface IInfoLogger { info(message: string): void; } interface IWarnLogger {...

If a service raises an exception during initialization in the constructor, DI will swallow this error and raise only the obscure error `Uncaught TypeError: this is undefined`. Here is a...

Hey! I was wondering if there's a way to register decorators in a [“SimpleInjector-ish” way](https://docs.simpleinjector.org/en/latest/aop.html#decoration)? For example, like: ```ts type SomeCommandHandler = CommandHandler class SomeHandler implements SomeCommandHandler { /*...*/ }...

The [Moddable](https://moddable.com) ([github](https://github.com/Moddable-OpenSource/moddable)) open-source project is a full JavaScript (2022) implementation for microcontrollers (such as the ESP32 and ESP8266) that supports TypeScript. Since it supports tiny microcontrollers, they do some...

When `DIContainer.constructInstance` fails to instantiate using `new`, it tries to call the implementation as a function. This causes exceptions in constructors to get lost, as the original exception is replaced...

I commonly encounter a situation where I get errors because TypeScript has removed the value-import because it thinks it is a type-only import. For example, a fairly typical index.ts for...

In PR #12 (now closed), the suggestion was to expose a hook from DI to abstract access to the maps and remove Moddable-specific code from the implementation. This new PR...