create-next-app --ts writes tsconfig.json for you, and an existing JavaScript project needs only a file renamed to .tsx and a next dev: Next.js 10,514 installs typescript and the @types packages and writes the config itself. Its include array is worth reading, because two of the six entries point into the build directory — ".next/types/**/*.ts", generated during next build, and ".next/dev/types/**/*.ts", what next dev writes. next-env.d.ts pulls the route types in with import "./.next/types/routes.d.ts". Do not edit that file and do not commit it: next dev, next build and next typegen all regenerate it. Put your own declarations in a separate .d.ts and add it to include.
Who actually checks the types
Turbopack 10,514 compiles TypeScript with SWC 553,439 , which strips types without checking them, exactly as node app.ts does in TypeScript on Node. Checking is a separate step next build runs afterwards with your own tsc:
✓ Compiled successfully in 3.3s Running TypeScript ... Finished TypeScript in 1805ms ...
During next dev nothing checks types at all. That keeps Fast Refresh fast, and it leaves your editor and a "typecheck": "tsc --noEmit" script as the only feedback before a build; run that script in CI, where it fails in seconds instead of after a full compile. The Next.js TypeScript plugin — "plugins": [{ "name": "next" }] plus "Use Workspace Version" in VS Code 550 — adds the framework checks: valid route segment config values, 'use client' placement, and client hooks used only in Client Components.
TypeScript 7 does not expose the JavaScript compiler API, so next build shells out to the project-local tsc: install typescript@^7 and it is used with no further configuration. Setting experimental.useTypeScriptCli to false returns to the bundled checker, which prints Next.js-flavored code frames for routes but cannot run the native compiler.