typedi icon indicating copy to clipboard operation
typedi copied to clipboard

Simple yet powerful dependency injection tool for JavaScript and TypeScript.

Results 65 typedi issues
Sort by recently updated
recently updated
newest added

Hi, is it possible to check if a singleton of a constructable was already created? `has` will only check if the constructable was registered globally. This is useful if you...

type: question

**I was trying to...** Register a Token value that could be reused in all resolved instanced per call to `Container.get(MyService)` use case: a `correlation` or `commonId` UUID that's shared between...

type: question

### Description I have a base class that handles a lot of common logic that my sub classes use. The base class accepts a single dependency, and is only used...

type: fix
status: needs triage

I have A and B injecting each other: ```typescript import "reflect-metadata"; import { Container, Inject, Service } from "typedi"; @Service() class A { @Inject((type) => B) private b!: B; constructor()...

type: fix
status: needs triage

### Description Here is the error message ``` TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'typeof IgpapiHttp' is not assignable to...

type: fix
status: fixed

### Description This task aims at rethinking and rewriting how container inheritance and dependency lookup works between containers. This task should include rework or implementation of the following features -...

type: feature

### Description Container.of used to accept instanceId of any. Now it only accepts string (see this commit: https://github.com/typestack/typedi/commit/511e37f29e7fce4759058cfc5d7acb297bf4a653). Shouldn't it also support Symbol or Token to prevent name clashes? ###...

type: feature
status: fixed

### Description This issue describes a list of various updates to the documentation. #### General - [ ] explain that injection only happens when class created via `Container.get` - [...

type: feature
flag: needs docs

There are some very common use-cases requiring asynchronous initialization of class instances, e.g. database connection on a repository. This PR enables this via opt-in non-breaking features, without having to do...

flag: needs discussion

### Description It is often needed to pass one-time options to an instance as a temporary dependency. ### Proposed solution ```ts container.get(SomeClass, {providers: [{id: SomeToken, value: {option: 123}}]}) container.get(SomeClass, {providers:...

type: feature