Optionalargs: { defaultLifetime?: Lifetimes; parent?: PluginContainer }Protected ReadonlybindingsReadonlyidProtected ReadonlymoduleOptionalparentProtectedaddOptionalmoduleId: stringStarts the binding sequence for an identifier.
Checks if this identifier has already been bound and only binds if it has not.
ProtectedcreateOptionalmoduleId: 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.
ProtectedgetOptionalfilter: (binding: Binding) => booleanProtectedgetOptionalcontainer: PluginContainerReturns the last binding for this identifier.
ProtectedgetOptionalcontainer: 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.
ProtectedresolveProtectedresolveProtectedresolveReturns 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