Function injectAll

Registers an injection for multiple dependencies of the same type.

  • Parameters

    • dependencyId: DependencyId | DependencyClass<any>

      Dependency identifier to resolve all instances from container hierarchy.

    • scope: ResolveScope = ResolveScope.Children

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

    Returns (_value: unknown, context: ClassFieldDecoratorContext) => void

    A decorator function for class fields.

    The decorated field will receive an array of all dependencies with the given ID from the container hierarchy according to the scope parameter.