← Back to Blog
·Jan 27, 2026·8 min read

TypeScript 7 Native Compiler: 10x Faster Builds with Go Rewrite

Microsoft rewrote the TypeScript compiler in Go, and it's 10x faster. VS Code builds drop from 77s to 7.5s. Here's the technical breakdown, breaking changes, and migration strategy.

TypeScriptCompilersPerformanceDeveloper ToolsGoJavaScript
JV

Jose Viscasillas

January 27, 2026 · 8 min read

TypeScript 7 Native Compiler: 10x Faster Builds with Go Rewrite

Microsoft just pulled off one of the most audacious moves in programming language history: rewriting the TypeScript compiler from TypeScript to Go.

The results are stunning:

  • VS Code: 77.8s → 7.5s (10.4x faster)
  • Playwright: 11.1s → 1.1s (10x faster)
  • Project load time: 8x faster

This isn't an optimization. It's a complete rewrite from the ground up.

Here's why it matters, what breaks, and how to migrate.

Why Rewrite TypeScript in Go?

TypeScript's compiler (tsc) is written in TypeScript. It compiles itself.

This is called bootstrapping, and it's elegant. But it has a fundamental problem: it's slow.

The Performance Ceiling

JavaScript (and by extension, TypeScript) is interpreted. V8 JIT-compiles hot functions, but there's always overhead:

  • Garbage collection pauses
  • Dynamic type checks at runtime
  • Prototype chain lookups
  • No SIMD or low-level optimizations

For a compiler that processes millions of lines of code, this adds up.

Why Go?

1. Native Performance Go compiles to machine code. No JIT. No interpreter. Just CPU instructions.

2. Concurrency Go's goroutines make parallel compilation trivial:

go
// Type-check 100 files in parallel
for _, file := range files {
    go func(f File) {
        typeCheck(f)
    }(file)
}

TypeScript's JavaScript implementation struggles with parallelism (Web Workers are clunky).

3. Memory Management Go's garbage collector is designed for low-latency server workloads. It pauses for microseconds, not milliseconds.

4. Deployment A single Go binary. No Node.js runtime dependency. No node_modules.

Benchmarks: The Numbers Don't Lie

Microsoft tested TypeScript 7 (Go) against TypeScript 6 (JavaScript) on real-world codebases:

ProjectTS 6 (JS)TS 7 (Go)Speedup
VS Code77.8s7.5s10.4x
Playwright11.1s1.1s10.0x
Azure SDK142.3s14.1s10.1x
TypeScript itself23.4s2.8s8.4x

Across the board: 8-10x faster.

Cold Start Performance

TypeScript 6:

bash
time tsc --noEmit
# First run: 12.3s (loading Node, parsing tsconfig, etc.)

TypeScript 7:

bash
time tsc --noEmit
# First run: 1.2s (native binary, instant startup)

Cold start is 10x faster too.

What Changed: TypeScript 6 → 7

TypeScript 7 isn't just faster—it's cleaner.

1. Strict-by-Default

TypeScript 7 enables all strict flags by default:

json
{
  "compilerOptions": {
    "strict": true,  // Now the default
    "strictNullChecks": true,  // Included in strict
    "strictFunctionTypes": true,  // Included in strict
    "noImplicitAny": true  // Included in strict
  }
}

Before (TS 6):

typescript
function greet(name) {  // OK (implicit 'any')
  console.log("Hello " + name);
}

Now (TS 7):

typescript
function greet(name) {  // ERROR: Parameter 'name' implicitly has an 'any' type
  console.log("Hello " + name);
}

// Fix:
function greet(name: string) {  // OK
  console.log("Hello " + name);
}

Migration: Add explicit types or set "strict": false temporarily.

2. ES5 Target Dropped

TypeScript 7 no longer compiles to ES5.

Minimum target: ES2015 (ES6)

json
{
  "compilerOptions": {
    "target": "ES5"  // ERROR: ES5 is no longer supported
  }
}

Why: ES5 polyfills bloated output. Modern browsers support ES2015 (released in 2015, 11 years ago).

Impact: If you need IE11 support, stick with TypeScript 6.

3. AMD, UMD, SystemJS Module Formats Removed

TypeScript 7 only supports:

  • ESNext (modern ES modules)
  • CommonJS (Node.js)
json
{
  "compilerOptions": {
    "module": "AMD"  // ERROR: AMD is no longer supported
  }
}

Migration:

  • Browser code: Use ESNext + bundler (Vite, webpack, Rollup)
  • Node.js: Use CommonJS or NodeNext

4. Classic Node Module Resolution Removed

TypeScript 7 removes the node resolution strategy.

json
{
  "compilerOptions": {
    "moduleResolution": "node"  // ERROR: Use 'node16' or 'nodenext'
  }
}

Fix:

json
{
  "compilerOptions": {
    "moduleResolution": "node16"  // Modern Node.js resolution
  }
}

This aligns with Node's ESM resolution algorithm.

The Migration Process

Step 1: Install TypeScript 7

bash
npm install -D typescript@7.0.0

# Or globally
npm install -g typescript@7.0.0

Step 2: Update tsconfig.json

json
{
  "compilerOptions": {
    "target": "ES2015",  // Minimum
    "module": "ESNext",  // Or "CommonJS"
    "moduleResolution": "node16",
    "strict": true  // Recommended (or add types gradually)
  }
}

Step 3: Fix Type Errors

Run the compiler:

bash
tsc --noEmit

Common Errors:

1. Implicit Any:

typescript
// Error: Parameter 'x' implicitly has an 'any' type
function double(x) { return x * 2; }

// Fix:
function double(x: number) { return x * 2; }

2. Null/Undefined Checks:

typescript
function getUser(id: string) {
  return users.find(u => u.id === id);  // Returns User | undefined
}

const user = getUser("123");
console.log(user.name);  // ERROR: 'user' is possibly 'undefined'

// Fix:
if (user) {
  console.log(user.name);
}

3. Function Type Strictness:

typescript
type Handler = (event: Event) => void;

const handler: Handler = (event: MouseEvent) => {  // ERROR
  console.log(event.clientX);
};

// MouseEvent is more specific than Event
// TS 7 enforces contravariance for function parameters

Step 4: Test Thoroughly

Strict mode catches real bugs:

typescript
// TS 6: Compiles fine
function processUser(user: User | null) {
  console.log(user.name);  // Runtime error if user is null
}

// TS 7: Compile error
function processUser(user: User | null) {
  console.log(user.name);  // ERROR: Object is possibly 'null'
}

// Fix:
function processUser(user: User | null) {
  if (user) {
    console.log(user.name);
  }
}

This would've crashed in production. TypeScript 7 catches it at compile time.

Performance in CI/CD

The biggest win is in CI pipelines.

Before (TypeScript 6):

yaml
- name: Type Check
  run: npm run type-check
  # Duration: 4m 32s

After (TypeScript 7):

yaml
- name: Type Check
  run: npm run type-check
  # Duration: 28s

From 4.5 minutes to 28 seconds.

For a team running 50 CI builds/day:

  • Time saved: 200 minutes/day
  • Developer happiness: Priceless

Watch Mode Improvements

tsc --watch is significantly better in TypeScript 7.

TypeScript 6:

bash
tsc --watch
# Initial compile: 12s
# File change detected...
# Recompiling: 8s

TypeScript 7:

bash
tsc --watch
# Initial compile: 1.2s
# File change detected...
# Recompiling: 0.3s

Incremental recompilation is 25x faster.

Breaking Changes: Full List

  1. Strict mode is default (add explicit types or disable)
  2. ES5 target removed (minimum ES2015)
  3. AMD/UMD/SystemJS module formats removed (use ESNext or CommonJS)
  4. Classic node module resolution removed (use node16 or nodenext)
  5. Deprecated APIs removed:

- ts.createProgram old signature - ts.createSourceFile with languageVersion < ES2015

Should You Upgrade?

Yes, if:

  • Your CI builds are slow
  • You work on large TypeScript codebases (500+ files)
  • You're already using strict mode
  • You don't support IE11

Wait, if:

  • Your codebase has lots of implicit any
  • You rely on AMD/UMD modules
  • You need ES5 output
  • Your team isn't ready for strict type checking

Gradual Migration Strategy

Don't upgrade all at once. Use this approach:

Phase 1: Test in Isolation

bash
# Install TS 7 separately
npm install -D typescript-next@7.0.0

# Test without affecting production
npx typescript-next --noEmit

Phase 2: Enable Strict Gradually

json
{
  "compilerOptions": {
    "strict": false,
    "strictNullChecks": true  // Start with one flag
  }
}

Fix errors. Then enable the next flag.

Phase 3: Update Dependencies

Check if your libraries support TypeScript 7:

bash
npm ls typescript

If packages bundle .d.ts files for TS 6, they might break.

Phase 4: Full Rollout

Once CI is green:

bash
npm install -D typescript@7.0.0

Update package.json:

json
{
  "engines": {
    "typescript": ">=7.0.0"
  }
}

The Bigger Picture

TypeScript 7 proves a controversial idea: sometimes you need to rewrite in a different language.

Precedents:

  • Rust-based JS tools: SWC, Turbopack, Oxc (all 10-100x faster than JS equivalents)
  • Go-based tools: esbuild (100x faster than webpack)
  • Zig-based tools: Bun (3x faster than Node.js)

JavaScript is amazing for application code. But for tooling (compilers, bundlers, linters), native languages dominate.

Conclusion

TypeScript 7 is the most significant TypeScript release ever.

10x faster builds change how you work:

  • CI pipelines that took minutes now take seconds
  • Watch mode feels instant
  • Large refactors don't freeze your editor

The breaking changes are real, but they enforce best practices. Strict mode catches bugs. Dropping ES5 reduces bloat.

If you're building TypeScript apps, TypeScript 7 is worth the migration effort.

The future of TypeScript is native. And it's fast.

---

Resources:

JV

Written by Jose Viscasillas

Senior Software Engineer building video platforms at ON24. 21 years of coding experience. I write about React, TypeScript, AI, and developer tools.

Recommended Reads

📬

Subscribe to the Newsletter

New articles delivered to your inbox. No spam, unsubscribe anytime.

Join 500+ developers getting weekly insights on React, TypeScript, and building products.