Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsMay 30, 2026·3 min de lecture

TypeScript-Go — Native TypeScript Compiler Rewritten in Go

Microsoft's official native port of the TypeScript compiler to Go, delivering up to 10x faster type-checking and build times for large codebases.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
TypeScript-Go
Commande d'installation directe
npx -y tokrepo@latest install f7b603b6-5c64-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

TypeScript-Go is Microsoft's effort to rewrite the TypeScript compiler in Go for native performance. The goal is to bring type-checking and emit times down by an order of magnitude on large projects where the current JavaScript-based tsc can take tens of seconds.

What TypeScript-Go Does

  • Performs full TypeScript type-checking using a native Go binary
  • Emits JavaScript output compatible with the standard tsc compiler
  • Provides a Language Server Protocol (LSP) implementation for editor integration
  • Targets 1:1 compatibility with the existing TypeScript type system
  • Runs as a standalone binary with no Node.js dependency required

Architecture Overview

The project is a line-by-line port of the TypeScript compiler source from JavaScript/TypeScript to Go. The scanner, parser, binder, checker, and emitter stages mirror the original architecture. By compiling to a native binary, it eliminates V8 JIT warm-up and garbage collection overhead, yielding significant speed gains especially on multi-million-line codebases.

Self-Hosting & Configuration

  • Clone the repo and build with go build or use pre-built binaries when available
  • Run the compiler against your tsconfig.json just like standard tsc
  • Editor integration is planned via an LSP server binary
  • Existing tsconfig.json files and compiler options are supported as-is
  • The project is still in preview; track the GitHub repo for release milestones

Key Features

  • Up to 10x faster type-checking compared to the JavaScript-based tsc
  • Native binary with zero Node.js runtime dependency
  • Full TypeScript language compatibility as the target
  • LSP support for real-time editor feedback
  • Open source under Microsoft, backed by the TypeScript core team

Comparison with Similar Tools

  • tsc (TypeScript) — the original JS-based compiler; TypeScript-Go is its native successor
  • SWC — Rust-based transpiler that skips type-checking; TypeScript-Go does full checking
  • esbuild — Go-based bundler/transpiler without type-checking; complementary tool
  • Oxc — Rust-based JS toolchain focused on linting and parsing; different scope
  • Biome — Rust linter/formatter; does not perform TypeScript type-checking

FAQ

Q: Will TypeScript-Go replace tsc? A: That is the long-term goal. Microsoft intends it to become the primary compiler once compatibility is validated.

Q: Does it support all TypeScript features? A: The aim is 100% compatibility. Some edge cases may lag during the preview period.

Q: Can I use it today? A: It is available as a preview. Check the repository for the latest build instructions and known limitations.

Q: Does it work with my IDE? A: LSP support is under development, which will enable integration with VS Code and other editors.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires