Back to blog

TypeScript 7 Native in Go: Microsoft's Compiler Performance Revolution

Hello HaWkers, Microsoft just announced one of the biggest changes in TypeScript history: version 7 will be completely rewritten in Go, abandoning the JavaScript/TypeScript base that existed since the project's inception.

This decision marks a fundamental transformation in how the compiler works, promising performance gains up to 10x on large projects.

The Official December 2025 Announcement

The TypeScript team published on their official blog the details of progress toward TypeScript 7.

Main points of the announcement:

  • TypeScript 6.0 will be the last JavaScript/TypeScript-based version
  • TypeScript 6.0 will work as a "bridge" between the 5.x line and 7.0
  • The native Go compiler is already functional for daily use
  • Features like auto-imports, find-all-references, and rename have been reimplemented

Why Go Was Chosen

The decision to use Go was not arbitrary.

Technical reasons:

Aspect JavaScript/TypeScript Go
Compilation speed Baseline 5-10x faster
Memory usage High Significantly lower
Parallelism Limited by event loop Native goroutines
Distribution Requires Node.js Single binary
Cold start Slow Instant

Performance Impact

The benchmark numbers are impressive.

Tests on Real Projects

Compilation time comparison:

# Large project (500k+ lines of code)

# TypeScript 5.7 (current)
tsc --noEmit
# Time: 45.2 seconds
# Memory: 2.8 GB

# TypeScript 7 (native Go)
tsc --noEmit
# Time: 4.8 seconds
# Memory: 890 MB

# Reduction: 89% in time, 68% in memory

Language Server Protocol (LSP)

The editor experience also improves drastically.

Editor improvements:

Operation TS 5.x TS 7 Native
Autocomplete 200-500ms 20-50ms
Go to Definition 100-300ms 10-30ms
Find All References 2-5s 200-500ms
Rename Symbol 3-8s 300-800ms
Project Load 10-30s 1-3s

Note: Benchmarks vary by project. Smaller projects will see more modest gains.

What Changes For Developers

In practice, most developers won't need to do anything different.

Full Compatibility

What stays the same:

  • Identical TypeScript syntax
  • tsconfig.json works normally
  • Editor integration (VS Code, etc.)
  • Compilation APIs for tools
  • Existing plugins and transformers

New Installation Method

Traditional installation (will continue to work):

npm install typescript@7

# or

yarn add typescript@7

New option: native binary:

# Direct binary download
curl -fsSL https://typescript.azureedge.net/v7.0.0/typescript-linux-x64 -o tsc
chmod +x tsc

# Or via system package manager
# macOS
brew install typescript

# Linux (Ubuntu/Debian)
apt install typescript

# Windows
winget install Microsoft.TypeScript

Migration from TypeScript 5.x/6.x

Recommended steps:

// tsconfig.json - no changes needed for most cases
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  }
}

Compatibility verification:

# Install preview version
npm install typescript@next

# Run verification
npx tsc --noEmit

# Compare output with current version
# If there are no new errors, migration will be transparent

TypeScript 6 As Bridge Version

TypeScript 6 will have a special role in the transition.

TypeScript 6's Function

Characteristics:

  • Last JavaScript-based version
  • Includes all features planned before the rewrite
  • Will receive extended security support
  • Allows projects to test compatibility with TS 7

Support timeline:

Version Status Support Until
TypeScript 5.x Current/LTS 2026
TypeScript 6.0 Bridge Release 2027
TypeScript 7.0 Native (Go) 2030+

TypeScript 6 Features

Confirmed new features:

// Native RegExp Escaping
const userInput = "hello[world]";
const escaped = RegExp.escape(userInput);
// Result: "hello\\[world\\]"

// Satisfies with improved narrowing
type Config = { debug: boolean; port: number };

const config = {
  debug: true,
  port: 3000,
  extra: "allowed", // doesn't error
} satisfies Config;

// Decorators with enhanced metadata
@logExecution({ timing: true })
class UserService {
  @cache({ ttl: 60 })
  async getUser(id: string) {
    // implementation
  }
}

Impact on Frameworks and Tools

The entire ecosystem benefits from the change.

Positively Affected Frameworks

Next.js:

# Current build on medium project
next build
# Time: 2-3 minutes

# With TypeScript 7 native
next build
# Time: 45-90 seconds

# Type checking during dev
# Almost instant feedback

Vite/Vue:

// vite.config.ts
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';

export default defineConfig({
  plugins: [vue()],
  // Parallel type checking will be much faster
  // Hot reload with type verification: <100ms
});

Build Tools

ESBuild + TypeScript 7:

The combination of ESBuild for transpilation and native TypeScript 7 for type checking results in extremely fast builds.

// build.js
import * as esbuild from 'esbuild';
import { exec } from 'child_process';

// Parallel type check (now viable in CI)
const typeCheck = exec('tsc --noEmit');

// Bundle
await esbuild.build({
  entryPoints: ['src/index.ts'],
  bundle: true,
  outfile: 'dist/bundle.js',
});

// Wait for type check (will be fast)
await typeCheck;

// Total time: seconds instead of minutes

Frequently Asked Questions

Developers have many questions about the transition.

Will My Code Break?

Short answer: Probably not.

Detailed answer:

The TypeScript team prioritized full compatibility. The language semantics remain identical. Rare cases that may differ:

  • Error messages may have slightly different text
  • Order of some checks may vary
  • Very specific plugins may need adaptation

Do I Need to Install Go?

No. The compiler will be distributed as a pre-compiled binary. Users don't need Go installed.

What About VS Code?

Fully compatible. The VS Code TypeScript extension is already being prepared to use the native language server.

// settings.json - optional configuration to use native TS
{
  "typescript.tsdk": "/usr/local/lib/typescript/lib",
  "typescript.enablePromptUseWorkspaceTsdk": true
}

When Will It Be Released?

Official timeline:

  • Public preview: Q1 2026
  • Release Candidate: Q2 2026
  • Stable version: Q3 2026

Preparing Your Project

Some actions can facilitate the transition.

Preparation Checklist

Recommended actions:

# 1. Update to TypeScript 5.7+
npm install typescript@latest

# 2. Enable strict mode (if not already)
# tsconfig.json: "strict": true

# 3. Resolve existing warnings
npx tsc --noEmit 2>&1 | grep -c "warning"

# 4. Update type dependencies
npx npm-check-updates -u "@types/*"

# 5. Test with preview version periodically
npm install typescript@next --save-dev

Optimized Configuration

Modern tsconfig.json:

{
  "compilerOptions": {
    "target": "ES2022",
    "lib": ["ES2022", "DOM", "DOM.Iterable"],
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "resolveJsonModule": true,
    "declaration": true,
    "declarationMap": true,
    "sourceMap": true,
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "noImplicitOverride": true,
    "noPropertyAccessFromIndexSignature": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "verbatimModuleSyntax": true,
    "isolatedModules": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist"]
}

The Future of TypeScript

The rewrite in Go opens possibilities that were impossible before.

Possible Future Features

Community speculation:

  1. Smarter incremental type checking

    • Persistent cache between sessions
    • Granular file invalidation
  2. Real parallelism

    • Checking multiple files simultaneously
    • Leveraging multi-core CPUs
  3. Integration with other compilers

    • Potential merge of efforts with Go tools
    • Possibility of WASM for browser
  4. Advanced metaprogramming

    • Compile-time macros
    • More powerful code transformations

Market Position

TypeScript in 2025:

According to GitHub Octoverse 2025, TypeScript became the most popular language on the platform, surpassing JavaScript for the first time.

Success factors:

  • Massive adoption in new projects
  • Migration of existing JavaScript projects
  • Requirement in many job postings
  • Mature types ecosystem (@types/*)

Conclusion

The TypeScript rewrite in Go represents a milestone in the language's evolution. Drastically better performance, lower resource consumption, and a smoother development experience benefit all developers in the ecosystem.

Backward compatibility ensures existing projects will continue working without modifications. The transition will be gradual and well-supported, with TypeScript 6 serving as a bridge.

If you work with TypeScript, it's worth following preview versions and testing your project periodically. The productivity gains will be significant.

To understand more about programming language trends and how TypeScript reached the top, check out our article about TypeScript as GitHub's Most Popular Language.

Let's go! 🦅

📚 Want to Master TypeScript from Zero to Advanced?

This article covered TypeScript 7 news, but mastering the language requires solid JavaScript fundamentals first.

Complete Study Material

If you want to build a solid foundation in JavaScript to then master TypeScript:

Investment options:

  • 1x of $4.90 on card
  • or $4.90 at sight

👉 Learn About JavaScript Guide

💡 Solid JavaScript foundation = Natural transition to TypeScript

Comments (0)

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

Add comments