Next.js 16+ · Command
next typegen
next typegen generates TypeScript definitions for an application's routes without running a full build. Use it before TypeScript checking, especially when CI should validate route types without starting Next.js or building the app.
Last updated
- Since
- 15.5.0
Syntax
next typegen [directory]In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
next devnext buildPagePropsLayoutPropsRouteContextnext-env.d.ts