Resolve a dependency
The identifier of the dependency
Optional
necessary: booleanIf true, throws an error if the dependency is not found
The resolved dependency or undefined if the dependency is not found
A DependencyResolutionError if the dependency is not found and necessary.
Resolve a necessary dependency.
The identifier of the dependency.
Optional
necessary: trueIf true, throws an error if the dependency is not found.
The resolved dependency.
A DependencyResolutionError if the dependency is not found.
Resolve a non necessary dependency
The identifier of the dependency
Optional
necessary: falseNot necessary, does not throw an error if the dependency is not found.
The resolved dependency or undefined if the dependency is not found
Resolve
method for static and instance Dependency Injection Container.