Adds the given Scopes to this container. Any dependencies with this scope will be instantiated when first requested and memoized within this container.
Rest
...scope: S[]The scope or scopes to add to this container
This container, now typed to include the added scopes
Applies the given Modules or Items to this container. All scopes and dependencies provided with the modules will be applied to this container.
Rest
...modules: MThe modules to apply to the container.
This container, now typed to include all types provided within the given modules
Binds the resolved value of src to key.
In other words, when key is requested, src will be used to provide the value.
Equivalent to provide(key, Inject.from(src))
The key or class of the type to be provided
The DependencyKey to use to when key is requested
This container, now typed to include the provided type and its dependencies
Specifies how to resolve the target type of the given key or class.
The type of the key or class object
Identifies the source data for the provider
Identifies the dependencies of the provided type
Identifies the dependencies for the type to be resolved synchronously
The key or class of the type to be provided
Rest
...args: [init: ComputedKey<Target<K>, any, D, Sync, P>] | [deps: SrcK, init: ((deps) => Target<K>)] | [init: (() => Target<K>)] | [scope: NonEmptyScopeList<S>, init: ComputedKey<Target<K>, any, D, Sync, P>] | [scope: NonEmptyScopeList<S>, deps: SrcK, init: ((deps) => Target<K>)] | [scope: NonEmptyScopeList<S>, init: (() => Target<K>)]The remaining arguments. These include:
scope
(optional): The Scope or ScopeList to which to bind the provided value
And one of the following:init
: A function returning the provided value, or a ComputedKey yielding the provided valuedeps, init
:deps
and returns the provided valueThis container, now typed to include the provided type and its dependencies
Specifies how to asynchronously resolve the target type of the given key or class. The signature is the same as provide, except that a Promise to the target type can be provided. The provided type cannot be directly requested through request. It can, however be requested through requestAsync or by using key.Async().
The type of the key or class object
Identifies the source data for the provider
Identifies the dependencies of the provided type
The key or class of the type to be provided
Rest
...args: [init: ComputedKey<T, any, D, any, P>] | [deps: SrcK, init: ((deps) => T)] | [init: (() => T)] | [scope: NonEmptyScopeList<S>, init: ComputedKey<T, any, D, any, P>] | [scope: NonEmptyScopeList<S>, deps: SrcK, init: ((deps) => T)] | [scope: NonEmptyScopeList<S>, init: (() => T)]The remaining arguments. These include:
scope
(optional): The Scope or ScopeList to which to bind the provided value
And one of the following:init
: An async function returning the provided value,
or a ComputedKey yielding the provided value or a promisedeps, init
:deps
and returns the provided valueThis container, now typed to include the provided type and its dependencies
Provides an instance of the target type for the given key or class.
The type of the key or class object
The key or class of the type to be provided
The provided instance
This container, now typed to include the provided type and its dependencies
Generated using TypeDoc
A Container-like object used for providing values for a Module.