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

    Function Inject

    • Parameter decorator that injects the instance associated with the given class.

      Throws an error 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.

      Throws an error 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.

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

      Throws an error if the token is not registered in the container.

      Type Parameters

      • Value

      Parameters

      Returns ParameterDecorator

      class Wizard {
      constructor(@Inject(forwardRef(() => Wand)) readonly wand: Wand) {}
      }
      // Other code...
      class Wand {}