Capítulo 425 de 456
Experimental flag controlling whether next build runs the project-local tsc CLI (default) or loads the TypeScript JavaScript compiler API — needed because TypeScript 7's JS API is currently unavailable.
experimental.useTypeScriptCli (default true): CLI checker runs by default, supporting TypeScript 6 and enabling TypeScript 7 usage.false: falls back to the JS compiler API; if TypeScript 7 is installed, next build exits because that API isn't available for TS7.tsc diagnostics (no Next.js code-frame rewriting); checks the full project selected by tsconfig (including test files and .next/dev/types); --debug-build-paths doesn't narrow the checked set with the CLI checker.const nextConfig: NextConfig = {
experimental: {
useTypeScriptCli: false,
},
}
next build falha, pois a API JS não existe pra TS7.npm install -D typescript@^7 pra usar o novo compilador via CLI checker.typescript.tsconfigPath continua selecionando o projeto passado ao tsc; typescript.ignoreBuildErrors pula o checker inteiro (incluindo o CLI).tsconfigPath e ignoreBuildErrors interagem diretamente com este checker.