TypeScript 7 (Project Corsa): What Next.js Devs Need to Know
TypeScript 7 rewrites the compiler in Go for 10x faster builds. Here's what it means for your Next.js project and what to do right now.
On this page
TypeScript 7 rewrites the compiler in Go. Builds that took 90 seconds now take 8. That is the headline, and here is everything else you actually need to understand.
On April 21, 2026, Microsoft released the TypeScript 7.0 Beta. It is the largest change to TypeScript in its 14-year history. This is the practical explainer for the Next.js developer: what is this, does it affect my project, and what should you do right now?
Why Microsoft Rewrote the Compiler
The original TypeScript compiler is a JavaScript program running on Node.js. In 2012, that was a reasonable choice because JavaScript was the only language the team could guarantee every contributor already knew. In 2026, that decision has become a structural bottleneck with three distinct causes:
- Node.js is single-threaded: the compiler checks one thing at a time and cannot use multiple CPU cores, even on machines with 8, 16, or 32 cores sitting idle.
- V8's garbage collector pauses type-checking at unpredictable moments. On large codebases, these GC pauses stack up and can add 10-20% to total build time.
- On a project with 100,000+ lines, teams wait 2 to 3 minutes for a full type check. Developers start skipping it because the feedback loop is too slow, which defeats the purpose of type safety.
Why Go and Not Rust or C++?
The Go decision surprised many developers who expected Rust. Microsoft's rationale came down to three factors: Go's goroutine-based concurrency maps naturally to the compiler's workload (parsing, binding, and checking files in parallel), Go's garbage collector is fast enough for compiler workloads without the complexity of manual memory management, and the existing TypeScript team could become productive in Go within weeks rather than months.
Rust would have offered zero-cost abstractions and no GC pauses, but the learning curve for the team would have added 6 to 12 months to the project timeline. C++ was never seriously considered because of its memory safety risks and build system complexity.
The practical result: Go's goroutines let the compiler check multiple files simultaneously across all available CPU cores. A machine with 8 cores can now do roughly 8 times the work per second compared to the single-threaded Node.js compiler.
What Changed Under the Hood
Understanding the architectural changes helps explain why the speed gains are so dramatic and where they apply most.
Parallel Type Checking
The old compiler processes files sequentially: parse file A, check file A, parse file B, check file B. The new compiler builds a dependency graph of your project, identifies which files can be checked independently, and fans the work out across goroutines. Files that depend on each other are still checked in order, but independent branches of your import tree are checked simultaneously.
This is why monorepos with many independent packages see the largest speed gains. Each package's internal files can be checked on a separate core.
Predictable Memory Usage
The JavaScript compiler creates millions of small objects (type nodes, symbol tables, diagnostic records) that V8's garbage collector must scan and reclaim. On a 500K-line codebase, GC pauses can individually last 50 to 200 milliseconds, and they occur hundreds of times during a full check.
Go's garbage collector is designed for low-latency workloads. Pauses are typically under 1 millisecond, and the compiler's memory layout is optimized to reduce allocations in the first place. The result is not just faster overall time but smoother, more predictable performance.
Native Binary Execution
The old compiler runs as JavaScript interpreted by V8, which JIT-compiles hot paths but still carries the overhead of a dynamic language runtime. The Go compiler produces a native binary that your OS executes directly. There is no startup cost for a JavaScript runtime, no JIT warmup phase, and no dynamic dispatch overhead.
This difference is most noticeable on cold starts. The first invocation of tsc on a CI server includes V8 startup time (200 to 500 ms). tsgo starts in under 10 ms.
Real-World Benchmark Numbers
These are verified numbers from real production codebases, not synthetic benchmarks. The speed gains vary based on project structure, dependency graph complexity, and how many files can be checked in parallel:
| Project | tsc (before) | tsgo (after) | Speed gain |
|---|---|---|---|
| VS Code (1.5M lines) | 89s | 8.7s | 10x |
| Sentry frontend (large React + TS) | 133s | 16s | 8x |
| Typical Next.js app (50K to 100K lines) | 25-40s | 3-6s | 5-15x |
| Small project (< 10K lines) | 3-5s | 1-2s | 2-4x |
Small projects see the smallest gains because the old compiler was already fast enough that the bottleneck was I/O (reading files from disk) rather than CPU. Large monorepos see the biggest gains because they have the most independent files that benefit from parallel checking.
CI environments often see even larger gains than local development because CI runners typically have many CPU cores but slow single-thread performance. The Go compiler's parallelism turns those extra cores into real build time savings.
tsgo vs tsc: Feature Parity Status
As of the TypeScript 7.0 Beta, tsgo covers the vast majority of tsc functionality. However, a few features are still catching up. Here is the current status:
| Fully Supported in tsgo | Not Yet Supported | |
|---|---|---|
| Type checking (--noEmit) | Complete parity with tsc | |
| JavaScript emit | Supported (beta) | |
| Declaration file emit (.d.ts) | Supported | |
| Project references | Supported with parallel builds | |
| Watch mode | Coming in 7.1 | |
| TypeScript compiler JS API | Will not be ported (Go binary) | |
| Language Service (editor integration) | In progress, expected Q4 2026 | |
| Custom transformer plugins | Requires new plugin API |
The missing watch mode is notable for local development. Until tsgo supports --watch, you will want to keep using tsc --watch for your development workflow and reserve tsgo for CI type checks and one-off validation.
The language service gap means VS Code still uses the JavaScript-based TypeScript server for editor features like autocomplete, hover types, and go-to-definition. Microsoft is actively porting the language service, but it is the most complex part of the compiler and will take longer.
How to Try tsgo Today
tsgo is the command-line tool for the Go-based compiler. You can run it alongside your existing tsc without committing to a full switch:
npm install -D @typescript/native-preview
npx tsgo --noEmit- Run
tsgo --noEmitin place oftsc --noEmit(same type-checking, dramatically faster). - Microsoft tested
tsgoagainst 20,000 TypeScript test cases. Only 74 edge-case differences found: output is identical totscfor most projects. - VS Code (1.5M lines) is compiled against
tsgodaily, so it is stable enough for CI use right now.
Running tsc and tsgo Side by Side
Before switching your CI pipeline, validate that tsgo produces the same diagnostics as tsc on your specific project. This script captures the output of both and compares them:
#!/bin/bash
# Compare tsc and tsgo output for your project
echo "Running tsc..."
npx tsc --noEmit 2>&1 | sort > /tmp/tsc-output.txt
echo "Running tsgo..."
npx tsgo --noEmit 2>&1 | sort > /tmp/tsgo-output.txt
echo "Comparing output..."
diff /tmp/tsc-output.txt /tmp/tsgo-output.txt
if [ $? -eq 0 ]; then
echo "Identical output. Safe to switch."
else
echo "Differences found. Review before switching."
fiIf the diff shows no differences, you can confidently replace tsc --noEmit with tsgo --noEmit in your CI pipeline. If differences appear, review each one carefully. Most are cosmetic (different error message ordering) rather than actual type-checking disagreements.
Impact on the Next.js Build Pipeline
Next.js developers often assume that tsc speed directly controls next build speed. That is only partially true. Understanding the Next.js build pipeline helps you know exactly where tsgo fits in.
When you run next build, several things happen in sequence: TypeScript type-checking, page compilation via SWC (Rust-based transpiler), static page generation, and bundle optimization. The TypeScript type-check step is where tsgo makes its impact.
| Build Phase | Tool Used | Affected by tsgo? |
|---|---|---|
| Type checking | tsc (or tsgo) | Yes, 5-15x faster |
| Transpilation (TS to JS) | SWC (Rust) | No, already fast |
| Static page generation | Next.js SSG | No |
| Bundle optimization | Webpack/Turbopack | No |
On a typical Next.js project, type checking accounts for 30 to 60% of total next build time. If your build takes 120 seconds and type checking is 60 seconds of that, switching to tsgo could reduce your total build to 66 seconds (saving 54 seconds on the type-check phase alone).
For projects using next build with ignoreBuildErrors: true in next.config.ts (which skips type checking during build), the impact of tsgo on build time is zero. However, you should still use tsgo --noEmit as a separate CI step to catch type errors without slowing your deployment.
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
typescript: {
// Skip type checking during next build (handled by tsgo in CI)
ignoreBuildErrors: true,
},
};
export default nextConfig;TypeScript 6: The Bridge Release
Before TypeScript 7, Microsoft shipped TypeScript 6 (March 2026) as a deliberate stepping-stone. If your project is not on TypeScript 6 yet, start here. TypeScript 6 enforces stricter defaults and removes deprecated options, which means any project that compiles cleanly on TS6 is ready for the TS7 compiler switch.
- Strict mode is now on by default:
"strict": trueintsconfig.jsonis the baseline, not opt-in. - Module resolution defaults changed: some older implicit import patterns now require explicit configuration.
- Deprecated options that were warnings in TypeScript 5.x are now hard errors.
- The
targetdefault changed fromES3toES2022, which may affect output if you relied on the old default.
Common TypeScript 6 Migration Fixes
These are the most frequent issues teams encounter when upgrading from TypeScript 5.x to 6. Address them before attempting the jump to TypeScript 7:
{
"compilerOptions": {
// TS6 requires explicit module resolution
"moduleResolution": "bundler",
// TS6 defaults to strict: true, but be explicit
"strict": true,
// These deprecated options are now errors in TS6
// Remove them from your tsconfig if present:
// "importsNotUsedAsValues" (use "verbatimModuleSyntax" instead)
// "preserveValueImports" (use "verbatimModuleSyntax" instead)
"verbatimModuleSyntax": true
}
}The Three-Step Plan
- 1
Upgrade to TypeScript 6 if you're on 5.x
The automated migration helper handles most mechanical changes:
bashnpx @andrewbranch/ts5to6 # Fix any remaining warnings TypeScript 6 surfacesAfter running the migration tool, do a full build to surface any remaining issues. Pay special attention to import statements that use the
import typesyntax, as TypeScript 6 is stricter about type-only imports. - 2
Install tsgo and compare output
bashnpm install -D @typescript/native-preview # Run both and compare: should produce identical results npx tsc --noEmit npx tsgo --noEmitIf both commands produce identical output, replace
tsc --noEmitwithtsgo --noEmitin your CI pipeline. Keeptscas a fallback until you have verified the switch across multiple PRs. - 3
Add tsgo to CI for faster type-check feedback
yaml — .github/workflows/ci.yml- name: Type check (fast) run: npx tsgo --noEmit - name: Build run: next buildThis gives you faster type-check feedback today while waiting for native Next.js integration. On GitHub Actions runners (which typically have 2 to 4 cores), expect a 3 to 6x improvement in type-check time.
Common Migration Pitfalls
Teams upgrading to TypeScript 7 or adopting tsgo hit a few recurring issues. Knowing them in advance saves hours of debugging.
Compiler Plugin Incompatibility
If your project uses custom TypeScript compiler plugins (configured via compilerOptions.plugins in tsconfig.json), those plugins will not work with tsgo. They are written against the JavaScript compiler API, which does not exist in the Go binary. This affects tools like typescript-plugin-css-modules and custom transformers.
The workaround is to run tsgo without plugins for type checking and keep tsc for any build steps that require plugin functionality. Microsoft has announced a new plugin API for the Go compiler, but it is not available yet.
Path Alias Edge Cases
Projects using paths in tsconfig.json with wildcard patterns occasionally see differences between tsc and tsgo in how path resolution is handled. The most common case is nested wildcards that resolve differently:
{
"compilerOptions": {
"paths": {
// This works identically in both compilers
"@/*": ["./src/*"],
// Nested wildcards: test with tsgo before relying on them
"@components/*/*": ["./src/components/*/index.ts"]
}
}
}If you use simple path aliases (like @/* mapping to ./src/*), you will not encounter any issues. Complex multi-wildcard patterns should be tested explicitly with tsgo before switching.
Monorepo Project References
Monorepos using TypeScript project references (references in tsconfig.json) actually benefit the most from tsgo, because the Go compiler can check referenced projects in parallel rather than sequentially. However, you need to ensure all referenced projects are also compatible with tsgo.
Run tsgo --build (the equivalent of tsc --build) from the root of your monorepo to validate all projects at once. If any individual project has issues, tsgo will report which one failed.
What to Watch Before Upgrading to TS7 Stable
TypeScript 7 stable is expected Q3 2026. When it lands, tsc will call tsgo under the hood, so most developers will see faster builds without changing anything. Two areas to track before that happens:
- Custom TypeScript compiler plugins that use the TypeScript JS API need updates (the JS API is not ported to Go)
- ts-node: check GitHub for TypeScript 7 compatibility status
- ts-jest: check GitHub for TypeScript 7 compatibility status
- ts-morph: check GitHub for TypeScript 7 compatibility status
- Next.js tsgo integration: watch Next.js changelog, expected with TS7 stable
- ESLint typescript-eslint: verify your version supports the TS7 parser
- Turborepo/Nx: confirm your monorepo tool handles tsgo correctly
Frequently Asked Questions
Is tsgo a drop-in replacement for tsc?
| Type-checking (--noEmit) | Emit (generating JS) | |
|---|---|---|
| Status | Yes (drop-in replacement today) | Beta (some edge-case differences) |
| Recommended? | Yes, use in CI now | Validate first, then switch |
Microsoft's recommendation: use tsgo for type-checking now, validate emit output separately before switching fully. For most Next.js projects, you only need --noEmit because SWC handles the actual JavaScript generation.
Does TypeScript 7 change the TypeScript language or just the compiler?
Just the compiler. TypeScript 7 is a rewrite of the tooling, not a language revision. The same syntax, type system, and tsconfig options work identically. Your existing code does not need any changes to work with tsgo. The only change is how fast the compiler checks your code.
Will ts-node, ts-jest, and ts-morph work with TypeScript 7?
Not immediately. These tools import the TypeScript compiler JavaScript API, which the Go compiler does not expose. Maintained projects are actively working on compatibility: check each project's GitHub issues for TypeScript 7 support status before upgrading.
# Check if ts-jest has TypeScript 7 support
# Look for issues mentioning "typescript 7" or "tsgo" on the repo
open https://github.com/kulshekhar/ts-jest/issuesWill my existing tsconfig.json work with tsgo?
Yes, for the vast majority of configurations. tsgo reads your existing tsconfig.json and supports all commonly used compiler options. A small number of rarely-used options are not yet implemented: tsgo warns you about them rather than silently ignoring them. If you see a warning about an unsupported option, check the TypeScript GitHub repo for the implementation timeline.
When will Next.js support tsgo natively?
The Vercel team is actively working on it. As of June 2026, Next.js still uses the JavaScript-based TypeScript compiler for its built-in type-checking step. Native tsgo integration is expected alongside TypeScript 7 stable in Q3 2026. Until then, run tsgo --noEmit separately in CI for faster type-check feedback.
Will VS Code autocomplete and IntelliSense use tsgo?
Not yet. VS Code's TypeScript language features (autocomplete, hover information, go-to-definition, refactoring) are powered by the TypeScript language service, which is a separate component from the command-line compiler. Microsoft is porting the language service to Go, but it is the most complex part of the system. Editor integration for tsgo is expected in late 2026 or early 2027.
In the meantime, your editor experience stays exactly the same. The speed improvement from tsgo only applies to command-line type checking and CI pipelines.
How much faster is tsgo for monorepos?
Monorepos see the largest gains because tsgo can check independent packages in parallel. A monorepo with 10 packages that takes 5 minutes to type-check with tsc --build can often finish in 30 to 45 seconds with tsgo --build. The more independent your packages are (fewer cross-package imports), the better the parallelism.
# For monorepos using project references
npx tsgo --build
# For monorepos using Turborepo or Nx
# Run tsgo inside each package's type-check script
turbo run typecheckWhat is the rollback plan if tsgo causes issues?
Since tsgo is installed as a separate package (@typescript/native-preview), rolling back is as simple as switching your CI command from npx tsgo --noEmit back to npx tsc --noEmit. Your tsconfig.json, source files, and build pipeline remain unchanged. There is no migration that needs to be reversed.
When TypeScript 7 stable ships and tsc internally calls tsgo, you can still pin TypeScript 6 in your package.json if you encounter issues. Downgrading is a single version change.
The Bottom Line
TypeScript 7 is the most significant change to the TypeScript toolchain since its original release. The Go rewrite removes the single biggest performance bottleneck, and the gains are real, verified, and available to try today.
For your Next.js project: upgrade to TypeScript 6 if you have not already, run tsgo --noEmit in CI to measure your specific speed gains, and expect integrated Next.js support when TypeScript 7 hits stable. The upgrade will be quiet for most teams: just a version bump and faster builds.
The developers who benefit most are those on large codebases who have been skipping type checks because they were too slow. With tsgo, the type checker finally runs fast enough to include in every PR check, every commit hook, and every save. That is the real win: not just speed, but bringing type safety back into the development loop where it was being skipped for practical reasons.
Related Articles
Husky + Prettier + lint-staged Setup for Next.js
Set up Husky v9, Prettier, and lint-staged in your Next.js project. Step-by-step guide covering pre-commit hooks with the correct 2026 config.
How to Use Environment Variables in Next.js (Without Leaking Them to the Browser)
Learn how to use .env files in Next.js correctly. Understand NEXT_PUBLIC_, avoid common mistakes, and set variables in Vercel and Cloudflare.