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

    Function Optional

    • Parameter decorator that injects the instance associated with the given class, or undefined if the class is not registered in the container.

      Type Parameters

      • Instance extends object

      Parameters

      Returns ParameterDecorator

    • Parameter decorator that injects the value associated with the given token, or undefined if the token is not registered in the container.

      Type Parameters

      • Value

      Parameters

      Returns ParameterDecorator

    • Parameter decorator that injects the value associated with the given token, or undefined 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(@Optional(forwardRef(() => Wand)) readonly wand: Wand | undefined) {}
      }
      // Other code...
      class Wand {}