tsyringe
tsyringe copied to clipboard
Lightweight dependency injection container for JavaScript/TypeScript
If user pass { useValue: undefined }, isProvider returns false, causing https://github.com/microsoft/tsyringe/blob/f738999f3058b223bdb81dada0164a358db2460e/src/dependency-container.ts#L91 treat the object as a class
**Describe the bug** @autoInjectable doesn't work with Create React App. **To Reproduce**    **Expected behavior** I'm sure there's an issue surrounding the way webpack is processing these file,...
Even though there is already the registry, where we can set the providers for the injections. It was discussed in a not so recent issue that the possibility of having...
Hi there. This PR moves the paramInfos acquired by the `injectable()` decorator from the global typeInfo map to constructor/class metadata. That fixes a `TypeInfo not known for ...` bug occurring...
**Describe the bug** DI does not work properly when using default values. ``` Error: Cannot inject the dependency at position #0 of "Target" constructor. Reason: TypeInfo not known for "Object"...
When working with tsyringe I've found the need for a scope that would allow me to use the same instance for a parent + all their childs. This is already...
small doc fix in readme
**Is your feature request related to a problem? Please describe.** Currently you cant use lifecycle scopes with `useFactory` provider. `Transient` is supported by default and `Singleton` can be achieved with...
I'd like to implement something like the following: A orchestration service whose constructor accepts dependency services (can be injected using `@inject` decorator) and a runtime value: ``` @injectable() class OrchestrationService...
**Is your feature request related to a problem? Please describe.** I need to install `reflect-metadata` even when if `emitDecoratorMetadata` not used. **Description** In some cases `emitDecoratorMetadata` can't work. For example,...