@lppedd/di-wise-neo - v0.6.0
    Preparing search index...

    Function OptionalAll

    • Parameter decorator that injects all instances provided by the registrations associated with the given class, or an empty array if the class is not registered in the container.

      Type Parameters

      • Instance extends object

      Parameters

      Returns ParameterDecorator

    • Parameter decorator that injects all values provided by the registrations associated with the given token, or an empty array if the token is not registered in the container.

      Type Parameters

      • Value

      Parameters

      Returns ParameterDecorator

    • Parameter decorator that injects all values provided by the registrations associated with the given token, or an empty array if the token is not registered in the container.

      Allows referencing a token that is declared later in the file by using the forwardRef helper function.

      Type Parameters

      • Value

      Parameters

      Returns ParameterDecorator

      class Wizard {
      constructor(@OptionalAll(forwardRef(() => Wand)) readonly wands: Wand[]) {}
      }
      // Other code...
      class Wand {}