Type alias DependencyKey

DependencyKey: OnlyObject<DependencyKey> | readonly DependencyKey[] | HasComputedKeySymbol<any> | HasTypeKeySymbol<any> | PrivateConstruct | null | undefined | void | Trace

Specifies which dependencies to request from a Container.

Target Types

KindKey Target Type

TypeKey <string>

NameKey string

TypeKey <number>

IdKey number

InjectableClass <User>

User User

ComputedKey

One of:

NameKey.Provider()
Inject.provider(NameKey)

() => string

ComputedKey

One of:

IdKey.Map(id => id.toString())
Inject.map(IdKey, id => id.toString())

string

ComputedKey

One of:

Inject.async(User).Lazy()
Inject.lazy(Inject.async(User))
// If 'User' extends 'Injectable':
User.Async().Lazy()

() => Promise<User>

Object key
{
name: NameKey,
id: IdKey.Provider(),
user: User,
}
{
name: string,
id: () => number,
user: User,
}
Array key
[NameKey, IdKey.Provider(), User]
[string, () => number, User]

Generated using TypeDoc