Skip to content
masterclass Buddy

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.

Subscribe
  • next dev
  • next build
  • PageProps
  • LayoutProps
  • RouteContext
  • next-env.d.ts

Source: CLI: next. Checked 2026-11-03.