Svelte · Middle · Question 71 of 75
What does a param matcher like [id=integer] do?
- ✓Correct answer: Matches the route only if a matcher function (in
src/params/integer.js) accepts the segment - 2Converts the param to a number automatically
- 3Creates an optional parameter
Explanation
If the matcher rejects the value, SvelteKit tries other routes, which is useful to disambiguate similar paths.