Parameter decorator that injects the value associated with the given token.
Throws an error if:
Parameter decorator that injects the value associated with the given token.
This overload allows referencing a token declared later in the file by using the tokenRef helper function.
Throws an error if:
Example:
class Wizard {
constructor(@Inject(tokenRef(() => Wand)) readonly wand: Wand) {}
}
// Other code...
class Wand {}
Parameter decorator that injects the instance associated with the given class.
Throws an error if: