Function resolveAll

  • Resolves all dependencies from container hierarchy either by its dependency ID or through a class constructor for auto-injectable classes.

    Type Parameters

    • T

    Parameters

    • instance: any

      The instance registered in a container (used to find its container reference).

    • dependencyId: DependencyId

      The dependency ID or class constructor.

    • Optionalscope: ResolveScope

      Bitwise enum to control where to search (Parent | Current | Children). Defaults to Children.

    Returns (
        T & Dependency & {
            "[DEPENDENCY_ID]": DependencyId;
            "[PROXYDI_CONTAINER]": IProxyDiContainer;
        }
    )[]

    Array with all found dependency instances, could be empty

    • [DEPENDENCY_ID]: DependencyId

      Unique identifier that could use to resolve this instance from container where it was registered

    • [PROXYDI_CONTAINER]: IProxyDiContainer

      ProxyDi container in which this instance was registered

  • Resolves all dependencies from container hierarchy either by its dependency ID or through a class constructor for auto-injectable classes.

    Type Parameters

    • T extends DependencyClass<any>

    Parameters

    • instance: any

      The instance registered in a container (used to find its container reference).

    • SomeClass: T
    • Optionalscope: ResolveScope

      Bitwise enum to control where to search (Parent | Current | Children). Defaults to Children.

    Returns (
        InstanceType<T> & Dependency & {
            "[DEPENDENCY_ID]": DependencyId;
            "[PROXYDI_CONTAINER]": IProxyDiContainer;
        }
    )[]

    Array with all found dependency instances, could be empty

    • [DEPENDENCY_ID]: DependencyId

      Unique identifier that could use to resolve this instance from container where it was registered

    • [PROXYDI_CONTAINER]: IProxyDiContainer

      ProxyDi container in which this instance was registered