Resolve a dependency.
The identifier used to register the class in the DI container.
The resolved dependency.
Identifier for more information on identifiers.
A DependencyResolutionError if the dependency is not found.
Resolve a dependency
The identifier used to register the class in the DI container.
The dependency is not necessary.
The resolved dependency or undefined if the dependency is not found.
Identifier for more information on identifiers.
Resolve a dependency.
Param: identifier
The identifier used to register the class in the DI container.
See
Identifier for more information on identifiers.
Param: necessary
If true, throws an error if the dependency is not found.
Returns
The resolved dependency or undefined if the dependency is not necessary and not found, or throws an error if the dependency is necessary and not found.
Throws
A DependencyResolutionError if the dependency is not found and necessary.