Skip to content

IDependencyResolver.resolve

github-actions[bot] edited this page Nov 17, 2024 · 2 revisions
API / IDependencyResolver / resolve method

This method has multiple overloads.


Resolves a dependency based on its configuration, if any. All unconfigured dependencies are transient.

resolve<T>(
  dependency: ResolvableSimpleDependency<T>
): T

Source reference: src/dependencies/IDependencyResolver.ts:30.

Generic Parameters

  • T - The dependency type to resolve.

Parameters

Returns: T

The resolved dependency.


Resolves a complex dependency. All such dependencies are transient as they require additional dependencies on the constructor.

resolve<T, TAdditional extends readonly any[]>(
  dependency: ComplexDependency<T, TAdditional>,
  additionalDependencies: TAdditional
): T

Source reference: src/dependencies/IDependencyResolver.ts:43.

Generic Parameters

  • T - The dependency type to resolve.

  • TAdditional - A tuple representing additional parameters required by the constructor.

    Type constraints: readonly any[].

Parameters

  • dependency: ComplexDependency<T, TAdditional>
    The complex dependnecy to resolve.

  • additionalDependencies: TAdditional
    Additional dependencies requested by the constructor besides the dependency resolver.

Returns: T

The resolved dependency.

Clone this wiki locally