Back to blog

TypeScript 7 Native in Go: 10x Faster and The End of JavaScript in the Compiler

Hello HaWkers, Microsoft has just confirmed one of the biggest changes in TypeScript history: the compiler will be completely rewritten in Go. The result? 10x faster compilation and the end of an era where TypeScript was compiled by JavaScript.

If you've ever waited minutes for a large project to compile, this news will change your life as a developer. And the best part: it's already available in Visual Studio 2026 Insiders.

The Big Change: From JavaScript To Go

For over a decade, the TypeScript compiler was written in TypeScript/JavaScript. It made sense at the time — a compiler that compiles itself is elegant. But it came at a cost: performance.

Why Go?

Technical Reasons:

  • Go offers compilation to native code, eliminating V8 overhead
  • Native parallelization with goroutines
  • Efficient memory management
  • Mature ecosystem for development tools

Impressive Numbers:

  • Compilation time: 10x faster in large projects
  • Project loading time: 8x faster
  • Memory usage: significantly reduced
  • IntelliSense responsiveness: nearly instant

TypeScript 6 vs TypeScript 7

Microsoft is releasing two versions to facilitate the transition.

TypeScript 6.0: The Bridge

# TypeScript 6 - last JavaScript-based version
npm install typescript@6

# Characteristics:
# - Last JavaScript-based version
# - Deprecates features incompatible with TS7
# - Maximum compatibility with TS5.x
# - Extended support for migration

Purpose of TypeScript 6:

  • Bridge between TypeScript 5.x and 7.0
  • Allows teams to migrate gradually
  • Deprecates APIs that won't exist in TS7
  • Highly compatible in terms of type-checking

TypeScript 7.0: The Native Future

# TypeScript 7 - native compiler in Go
npm install typescript@7

# Or via Visual Studio 2026 Insiders
# Already available for testing

What's New in TypeScript 7:

  • 100% Go compiler
  • New parallel architecture
  • Redesigned language service
  • Compatibility with existing projects

Real Performance Impact

See real comparisons from projects of different sizes.

Small Projects (< 100 files)

# Before (TS 5.x)
tsc --build
# Time: 2.3 seconds

# After (TS 7.0)
tsc --build
# Time: 0.2 seconds

Noticeable gain, but not revolutionary. In small projects, the difference is a matter of seconds.

Medium Projects (100-500 files)

# Before (TS 5.x)
tsc --build
# Time: 15-30 seconds

# After (TS 7.0)
tsc --build
# Time: 1.5-3 seconds

Here the difference starts to be significant. Watch mode becomes truly instant.

Large Projects (500+ files)

# Before (TS 5.x)
tsc --build
# Time: 2-5 minutes

# After (TS 7.0)
tsc --build
# Time: 12-30 seconds

Monorepos with thousands of files:

  • Before: 10+ minutes for cold build
  • After: less than 1 minute

What Changes For Developers

The good news: for most people, nothing changes in how you write code.

TypeScript Code Stays The Same

// Your TypeScript code continues to work exactly the same
interface User {
  id: string;
  name: string;
  email: string;
}

async function fetchUser(id: string): Promise<User> {
  const response = await fetch(`/api/users/${id}`);
  return response.json();
}

// Types, interfaces, generics - all the same
type UserList = User[];
const users: UserList = [];

Compatible tsconfig.json

{
  "compilerOptions": {
    "target": "ES2024",
    "module": "ESNext",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  }
}

Your existing configurations continue to work. Microsoft prioritized compatibility.

Node.js Now Supports Native TypeScript

Meanwhile, another revolution happened: Node.js now supports TypeScript natively.

How It Works

# Node.js 22.18.0+ supports TypeScript directly
node file.ts

# No prior transpilation!
# No ts-node!
# No additional configuration!

The Trick:
Node.js treats types as whitespace, removing them at runtime. This means:

  • No build step for development
  • Stack traces point to correct lines
  • Clean and straightforward workflow

Practical Example

// app.ts - run directly with node app.ts
import express from 'express';

interface AppConfig {
  port: number;
  env: 'development' | 'production';
}

const config: AppConfig = {
  port: 3000,
  env: 'development'
};

const app = express();

app.get('/', (req, res) => {
  res.json({ message: 'Native TypeScript!' });
});

app.listen(config.port, () => {
  console.log(`Server running on port ${config.port}`);
});
# Run directly
node app.ts
# Server running on port 3000

ESM Is Finally The Standard

2026 marks the year where ES Modules became the definitive standard.

Goodbye CommonJS

// CommonJS (legacy)
const express = require('express');
module.exports = { app };

// ES Modules (standard)
import express from 'express';
export { app };

Why ESM Won:

  • Native browser support
  • Efficient tree-shaking
  • Analyzable static imports
  • Cleaner and more modern syntax

Migrating To ESM

// package.json
{
  "name": "my-project",
  "type": "module",
  "exports": {
    ".": {
      "import": "./dist/index.js",
      "types": "./dist/index.d.ts"
    }
  }
}

Most libraries now publish ESM only. CJS is officially in legacy mode.

Visual Studio 2026 Insiders

The complete native TypeScript 7 experience is already available in VS 2026 Insiders.

IntelliSense Improvements

Before (TS5):

  • Noticeable delay in large projects
  • Occasional freezes during indexing
  • Auto-complete sometimes slow

After (TS7 Native):

  • Instant response even in monorepos
  • Parallel background indexing
  • Auto-complete always responsive

New Features

// Better type inference
const data = await fetch('/api').then(r => r.json());
// TS7 infers types more precisely from context

// Faster go-to-definition
// Parallel find references
// Optimized rename symbol

Release Timeline

January 2026:

  • TypeScript 7 preview in Visual Studio 2026 Insiders
  • First public tests

Q1 2026:

  • TypeScript 6.0 stable (last JavaScript version)
  • TypeScript 7.0 public beta

Q2 2026:

  • TypeScript 7.0 release candidate
  • Recommended migration begins

Q3 2026:

  • TypeScript 7.0 stable
  • Full support in all IDEs

How To Prepare

Actions you can take now to get ready.

1. Update To TypeScript 5.9+

npm install typescript@latest

2. Check Compatibility

# Run with strict mode
npx tsc --strict

# Check deprecation warnings
npx tsc 2>&1 | grep -i deprecated

3. Migrate To ESM

// package.json
{
  "type": "module"
}

4. Test on VS 2026 Insiders

Download Visual Studio 2026 Insiders and test your project with the new native compiler.

Impact on the Ecosystem

The switch to Go has impacts beyond performance.

Bundlers and Tools

Vite 8 with Rolldown:

  • Rolldown (Rust bundler) integrated into Vite 8
  • Replaces ESBuild and Rollup
  • Even greater performance

Modern build tools:

  • SWC, esbuild, Bun were already fast
  • Native TypeScript eliminates the type-checking bottleneck

CI/CD

# GitHub Actions - before
- name: Build
  run: npm run build
  # Time: 5 minutes

# GitHub Actions - after
- name: Build
  run: npm run build
  # Time: 45 seconds

Significantly faster CI pipelines. Lower costs, faster feedback.

Conclusion

Native TypeScript 7 in Go represents the biggest technical evolution of the language since its launch. Microsoft bet big and delivered:

  • 10x faster compilation
  • 8x faster project loading
  • Compatibility with existing code
  • Node.js with native TypeScript support

For developers, it means less time waiting for builds and more time coding. For teams with large monorepos, the difference will be transformative.

The future of TypeScript is native, parallel, and incredibly fast.

If you want to keep up with the latest news in the JavaScript ecosystem, I recommend checking out another article: WebAssembly 3.0 and the Web Performance Revolution where we explore another technology that is transforming web development.

Let's go! 🦅

Comments (0)

This article has no comments yet 😢. Be the first! 🚀🦅

Add comments