Optional
args: { defaultLifetime?: Lifetimes; parent?: PluginContainer }Protected
Readonly
bindingsReadonly
idProtected
Readonly
moduleOptional
parentProtected
addOptional
moduleId: stringStarts the binding sequence for an identifier.
Checks if this identifier has already been bound and only binds if it has not.
Protected
createOptional
moduleId: stringReturns true or false if this Container
has the requested Identifier
in itself or any of its parents
Returns true or false if this Container
has the requested Identifier
in itself or any of its parents
Returns true or false if this Container
has the requested Identifier
in itself or any of its parents
Returns the first binding matching this identifier.
Returns all bindings with this identifier.
Returns all bindings with this identifier and name combination.
Returns all bindings with this identifier, name and tagged combination.
Protected
getOptional
filter: (binding: Binding) => booleanProtected
getOptional
container: PluginContainerReturns the last binding for this identifier.
Protected
getOptional
container: PluginContainerReturns the last binding for this identifier and name combination.
Returns the last binding for this identifier, name and tag combination.
Returns the first binding matching this identifier and name.
Returns the first binding matching this identifier, name and tag.
Returns true or false if this Container
has the requested Identifier
Returns true or false if this Container
has the requested Identifier
Returns true or false if this Container
has the requested Identifier
Unbinds all bindings for this identifier and rebinds the new binding.
Protected
resolveProtected
resolveProtected
resolveReturns the value of the binding if it exists, otherwise returns undefined.
Returns all bindings with this identifier or an empty array if it does not exist.
Clears all bindings and references held by this container.
Unbinds all bindings that were registered from a module(s).
The main dependency injection container that manages bindings and resolves dependencies. Supports hierarchical container structures, multiple binding types, and module-based organization.
Example