NestJS · Middle · Question 12 of 75
What is useExisting for?
- 1Reusing an instance from another app
- 2Creating a new instance each time
- ✓Correct answer: Creating an alias: a second token that resolves to the same instance as an existing provider
Explanation
For example, expose a LoggerService interface token that points to an existing PinoLogger instance.