Next.js · Senior · Question 38 of 75
What is typedRoutes useful for?
- ✓Correct answer: TypeScript checks paths in
<Link href>androuter.push - 2It speeds up routing by compiling the route table
- 3It generates a typed REST client for all Route Handlers
Explanation
Next.js generates types for all routes, and a typo in href="/dashbord" becomes a compile error. The same generated types power the PageProps/LayoutProps helpers. The option doesn't affect routing speed.