TypeScript 7 and Project Corsa: Go-Based Compiler That's 10x Faster

Posted on: 4/27/2026 3:17:01 PM

Have you ever waited 78 seconds every time you build a large TypeScript project? Or experienced editor lag of several seconds on each code completion? That's the daily reality for millions of developers using the JavaScript-based tsc compiler. TypeScript 7.0 — codenamed Project Corsa — changes everything: the compiler has been completely rewritten in Go, delivering 10x faster builds, half the memory usage, and true parallelism.

10x Faster build speed vs. legacy tsc
50% Reduction in runtime memory usage
99.6% Test case compatibility (19,926/20,000)
7.5s VS Code 1.5M LOC build (down from 78s)

1. Why Rewrite in Go?

The TypeScript compiler (tsc) was originally written in TypeScript itself — a reasonable choice in 2012 when the project was small. However, after 12 years, with an increasingly complex codebase and ever-larger user projects, JavaScript/Node.js exposed two critical bottlenecks:

  • Single-threaded: Node.js runs on a single-threaded event loop. Worker threads exist but cannot share memory efficiently — each worker must serialize/deserialize data via postMessage, creating massive overhead for complex structures like ASTs and type graphs.
  • GC overhead: V8's garbage collector handles short-lived web requests well, but with a compiler holding millions of AST nodes in memory throughout compilation, GC pauses become a bottleneck.

Microsoft evaluated several replacement languages. Here's why Go won:

CriteriaGoRustC++
Pattern match with TS codebaseVery high — struct, interface, error handling closely matchMedium — ownership model differs significantlyLow — complex memory management
Garbage collectionBuilt-in GC, ideal for interconnected structures (AST, type graph, symbol table)No GC — must manage lifetimes manuallyNo GC — manual memory
ConcurrencyGoroutines — lightweight, shared memoryThreads + async — powerful but complexThreads — requires sync primitives
File-by-file translation speedFast — 1:1 structural translationSlow — ownership redesign neededSlow — memory redesign needed

File-by-file translation

Rather than rewriting from scratch, the TypeScript team translated each file individually from TS to Go, preserving the logical structure. This ensures behavioral consistency and makes debugging easier — each Go file maps directly to its original TS counterpart.

2. New Compiler Architecture

The new compiler (internally named tsgo, to be renamed tsc at stable release) retains the same pipeline but exploits parallelism at every stage possible:

graph LR
    subgraph "Source Files"
        F1["file1.ts"]
        F2["file2.ts"]
        F3["file3.ts"]
        FN["...fileN.ts"]
    end

    subgraph "Parallel Parsing"
        P1["Parser
Goroutine 1"] P2["Parser
Goroutine 2"] P3["Parser
Goroutine N"] end subgraph "Type Checking (Worker Pool)" TC1["Checker 1
Files 1..K"] TC2["Checker 2
Files K+1..2K"] TC3["Checker N
Files 2K+1..3K"] end subgraph "Parallel Emit" E1["Emit JS 1"] E2["Emit JS 2"] E3["Emit JS N"] end F1 --> P1 F2 --> P2 F3 --> P3 FN --> P3 P1 --> TC1 P2 --> TC2 P3 --> TC3 TC1 --> E1 TC2 --> E2 TC3 --> E3 style P1 fill:#e94560,stroke:#fff,color:#fff style P2 fill:#e94560,stroke:#fff,color:#fff style P3 fill:#e94560,stroke:#fff,color:#fff style TC1 fill:#2c3e50,stroke:#fff,color:#fff style TC2 fill:#2c3e50,stroke:#fff,color:#fff style TC3 fill:#2c3e50,stroke:#fff,color:#fff style E1 fill:#4CAF50,stroke:#fff,color:#fff style E2 fill:#4CAF50,stroke:#fff,color:#fff style E3 fill:#4CAF50,stroke:#fff,color:#fff

tsgo compilation pipeline — parsing and emit run fully in parallel, type checking uses a deterministic worker pool

2.1 Parallel Parsing

Each source file is parsed independently in its own goroutine. Since parsing doesn't depend on type information from other files, this is the most straightforward stage to parallelize. ASTs are generated concurrently for all files.

2.2 Deterministic Type Checking

Type checking is the most complex phase — types can cross-reference across files. tsgo solves this with a deterministic worker pool: files are assigned to workers in a fixed division (no dynamic scheduling), ensuring identical results regardless of how many times you run the build.

# Configure type-checker workers
npx tsgo --checkers 4        # Default: 4 workers
npx tsgo --checkers 8        # Scale up for more CPUs
npx tsgo --singleThreaded    # Debug mode — 1 thread, deterministic
npx tsgo --builders 2        # Parallelize across monorepo projects

2.3 Parallel Emit

The final phase — generating .js and .d.ts files — also runs in parallel, with each file emitted independently in its own goroutine.

Where the 10x comes from

Roughly 50% of the speedup comes from Go being a compiled language — native execution is faster than V8 JIT. The other 50% comes from true parallelism via goroutines with shared memory — something Node.js worker threads cannot achieve with comparable efficiency.

3. Real-World Benchmarks

Microsoft published benchmarks on large open-source projects, running on identical hardware:

ProjectLines of Codetsc (TS 6.0)tsgo (TS 7.0)Speedup
VS Code~1.5M LOC78s7.5s10.4x
Sentry~800K LOC133s16s8.3x
Playwright~200K LOC11s1.1s10x
TypeORM~80K LOC4s0.3s13.3x

Beyond build speed, editor experience sees dramatic improvement:

1.2s VS Code TS language service startup (from 9.6s)
~50% Less RAM while editor analyzes project
<10KB Base bundle size of tsgo binary

4. Important Breaking Changes

TypeScript 7 isn't just faster — it also aggressively cleans up technical debt. Here are the key changes to watch:

4.1 New Defaults

OptionTS 6 (old default)TS 7 (new default)
strictfalse (opt-in)true
module"commonjs""esnext"
typesAuto-include @types/*[] (must declare explicitly)
noUncheckedSideEffectImportsfalsetrue
esModuleInteropOptionalAlways on, cannot be disabled

4.2 Removed Features

  • target: "es5" — ES5 output is discontinued. Minimum target is ES2018+.
  • --outFile — Concatenation-based bundling is removed. Use a bundler (Vite, Webpack, esbuild).
  • moduleResolution: "node" — Must migrate to "nodenext" or "bundler".
  • Legacy module systems: AMD, UMD, SystemJS are no longer supported.
  • Custom transformers / compiler plugins: Stable API expected in TypeScript 7.1.

Watch out for @types auto-inclusion

TS 7 defaults to types: [] — meaning @types/node, @types/jest, etc. will not be automatically included. You must declare them explicitly in tsconfig.json: "types": ["node", "jest"]. Otherwise you'll see errors like "Cannot find name 'process'".

5. Installation and Testing

You can try tsgo today without affecting your existing project:

# Install native preview
npm install -D @typescript/native-preview@beta

# Run type-check only (no emit) — safest way to test
npx tsgo --noEmit

# Run with specific tsconfig
npx tsgo --project ./src/tsconfig.json

# Compare timing with current tsc
time npx tsc --noEmit
time npx tsgo --noEmit

In VS Code, install the "TypeScript Native Preview" extension from the Marketplace, then run the command:

TypeScript Native Preview: Enable (Experimental)

6. Migration Strategy from TS 5/6 to TS 7

Don't jump straight to TS 7 — follow a safe migration path:

graph TD
    A["Step 1: Upgrade to TS 6.0
(bridge release)"] --> B["Step 2: Add CI job
tsgo --noEmit (non-blocking)"] B --> C["Step 3: Fix warnings
and deprecations"] C --> D["Step 4: Switch CI
to blocking tsgo"] D --> E["Step 5: Audit tooling
eslint, bundler, tests"] E --> F["Step 6: TS 7 stable
Replace tsc entirely"] style A fill:#f8f9fa,stroke:#e94560,color:#2c3e50 style B fill:#f8f9fa,stroke:#e94560,color:#2c3e50 style C fill:#f8f9fa,stroke:#e94560,color:#2c3e50 style D fill:#f8f9fa,stroke:#e94560,color:#2c3e50 style E fill:#f8f9fa,stroke:#e94560,color:#2c3e50 style F fill:#e94560,stroke:#fff,color:#fff

Safe migration roadmap — TS 6 is the bridge release that surfaces breaking changes early

Step 1: Upgrade to TypeScript 6.0

TS 6 is a bridge release — it warns about all features that will be removed in TS 7 but doesn't actually remove them yet. This is the most important step for early detection of issues.

Steps 2-3: Add non-blocking CI job

Add a tsgo --noEmit job to your CI pipeline without blocking merges. Collect the error list, fix gradually. Once errors reach zero, switch to blocking.

Steps 4-5: Audit tooling

Check your dependencies:

  • Bundlers (Vite, Webpack, esbuild, Rollup): Mostly unaffected — they use their own parsers.
  • typescript-eslint: Needs typescript@npm:@typescript/typescript6 alias temporarily until official support.
  • Biome v2: ESLint replacement with no TypeScript dependency — good choice to avoid compatibility issues.

7. Current and Upcoming Editor Features

As of the Beta (April 2026), tsgo supports these editor features:

FeatureStatusNotes
Error diagnostics✓ WorkingFull support
Hover information✓ WorkingType info on hover
Go-to-definition✓ WorkingJump to definition
Completions (basic)✓ WorkingNo auto-imports yet
Auto-imports◯ In progressExpected before stable
Find all references◯ In progress
Rename symbol◯ In progress
Signature help◯ In progress
--build mode◯ In progressCritical for monorepos
--declaration emit◯ In progressNeeded for library authors

Standard LSP replaces TSServer

tsgo uses the standard Language Server Protocol (LSP) instead of TypeScript's proprietary TSServer format. This means any LSP-compatible editor (VS Code, Neovim, JetBrains, Helix...) can integrate natively — no more dependency on a TypeScript-specific plugin.

8. Ecosystem Impact

8.1 Frontend Frameworks

For Vue.js, React, Angular — the new compiler doesn't directly affect runtime code. However:

  • Dramatically improved DX: Faster hot reload, instant code completion, 10x faster CI pipeline builds.
  • Monorepo benefits: Nx/Turborepo projects with dozens of packages will see the biggest gains via --builders parallelism.

8.2 Backend (.NET + TypeScript)

In full-stack architectures with ASP.NET Core backend + TypeScript frontend:

  • Overall CI pipeline is significantly faster — TypeScript build is no longer the bottleneck.
  • Docker multi-stage builds: the TypeScript build stage shrinks from minutes to seconds.

8.3 Tooling Ecosystem

graph LR
    subgraph "Unaffected"
        V["Vite / Rollup"]
        W["Webpack"]
        E["esbuild"]
        SWC["SWC"]
    end

    subgraph "Needs Update"
        ESL["typescript-eslint
(temporary alias)"] JB["JetBrains IDE
(plugin update)"] end subgraph "Good Alternative" B["Biome v2
(no TS dependency)"] end style V fill:#4CAF50,stroke:#fff,color:#fff style W fill:#4CAF50,stroke:#fff,color:#fff style E fill:#4CAF50,stroke:#fff,color:#fff style SWC fill:#4CAF50,stroke:#fff,color:#fff style ESL fill:#ff9800,stroke:#fff,color:#fff style JB fill:#ff9800,stroke:#fff,color:#fff style B fill:#2c3e50,stroke:#fff,color:#fff

TS 7 impact levels across the tooling ecosystem

9. Development Timeline

March 2025
Anders Hejlsberg announces Project Corsa — TypeScript compiler will be rewritten in Go. The community reacts with excitement.
May 2025
TypeScript Native Preview is released. Install via @typescript/native-preview, run tsgo --noEmit.
January 2026
TypeScript 7.0 first stable release for core compiler. JSX type-checking and JS/JSDoc support complete.
April 2026
TypeScript 7.0 Beta — production-ready for CI and day-to-day workflows. Editor features (completions, go-to-def, hover) working.
Q3 2026 (expected)
TypeScript 7.0 stable — --build mode, --declaration emit, full editor features. tsgo renamed to tsc in the main package.

Conclusion

TypeScript 7 / Project Corsa is the biggest change in TypeScript's history — not in syntax or the type system, but in the technical foundation. The compiler rewritten in Go delivers 10x speed and true parallelism, solving the biggest daily pain point for TypeScript developers.

With 99.6% test compatibility and a clear migration path through the TS 6 bridge release, you can start testing tsgo --noEmit today with zero risk. When stable ships in Q3 2026, this will be the largest "free" upgrade for every TypeScript project — from small startups to million-line monorepos.

References: