NestJS · Junior · Question 72 of 75

What does @Query('limit', new DefaultValuePipe(20), ParseIntPipe) limit: number do when limit is missing?

Explanation

Pipes run in order. DefaultValuePipe fills in a value before ParseIntPipe validates it.

Further reading

Problem with a question

NestJS · Junior · question 72

Test yourself

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

Take this quiz