NestJS · Junior · Question 30 of 75

What does @Param('id', ParseIntPipe) id: number do with /users/abc?

Explanation

For valid input the pipe converts the string to a number, so the handler gets the right type.

Further reading

Problem with a question

NestJS · Junior · question 30

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