NestJS · Junior · Question 30 of 75
What does @Param('id', ParseIntPipe) id: number do with /users/abc?
- 1Passes the string
abc - ✓Correct answer: Responds with 400 Bad Request because
abcisn't an integer - 3Passes
NaNto the handler
Explanation
For valid input the pipe converts the string to a number, so the handler gets the right type.