Next.js · Senior · Question 46 of 75
Which command generates the PageProps and LayoutProps types without running the dev server?
- ✓Correct answer:
next typegen - 2
next types - 3
tsc --next
Explanation
next typegen (since Next.js 15.5) generates global type helpers from the route structure - handy in CI before tsc --noEmit. The types are also updated during next dev and next build.