NestJS · Middle · Question 75 of 75

What does @Optional() on a constructor parameter do?

Explanation

Useful for optional integrations, e.g. a module that works with or without a configured metrics client.

Further reading

Problem with a question

NestJS · Middle · question 75

Test yourself

Take the NestJS · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz