Cette page est affichée en anglais. Une traduction française est en cours.
SkillsMay 11, 2026·2 min de lecture

TypeScript Go — Native TypeScript Compiler Port in Go

A native port of the TypeScript compiler to Go by Microsoft, delivering up to 10x faster type-checking and build times.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
TypeScript Go Overview
Commande CLI universelle
npx tokrepo install ec44e9ae-4d11-11f1-9bc6-00163e2b0d79

Introduction

TypeScript Go is Microsoft's official effort to port the TypeScript compiler from JavaScript to Go. The goal is dramatically faster type-checking and compilation, targeting a 10x speedup for large codebases while maintaining full compatibility with the existing TypeScript language.

What TypeScript Go Does

  • Type-checks TypeScript projects using a Go-native compiler
  • Produces identical diagnostics and output to the standard tsc compiler
  • Parallelizes type-checking across CPU cores using Go goroutines
  • Supports standard tsconfig.json configuration files
  • Serves as a staging ground for the future native TypeScript toolchain

Architecture Overview

The compiler re-implements the TypeScript parser, binder, and checker in idiomatic Go. It leverages Go's built-in concurrency model to parallelize file parsing and type resolution. The project tracks the upstream TypeScript test suite to ensure behavioral parity with the JavaScript-based compiler.

Self-Hosting & Configuration

  • Requires Go 1.22+ to build from source
  • Uses the same tsconfig.json format as standard TypeScript
  • Pre-built binaries are planned for major platforms
  • Integrates with existing editor tooling via the Language Server Protocol
  • Environment variable TSGO_MAX_PROCS controls parallelism

Key Features

  • Up to 10x faster type-checking on large monorepos
  • Full compatibility with TypeScript language semantics
  • Parallel file processing via Go's concurrency primitives
  • Lower memory usage compared to the Node.js-based compiler
  • Backed by the official TypeScript team at Microsoft

Comparison with Similar Tools

  • tsc (TypeScript) — the canonical JS-based compiler; TypeScript Go is its native successor
  • swc — fast transpiler but does not perform type-checking
  • esbuild — bundler with minimal TS support, no full type checking
  • Oxc — Rust-based parser/linter; different scope
  • Biome — linter/formatter, not a full compiler

FAQ

Q: Can I use TypeScript Go as a drop-in replacement for tsc? A: That is the goal once the project reaches feature parity. Currently it is a staging/preview build.

Q: Does it support all TypeScript features? A: It aims for full compatibility and tracks the upstream test suite, though some edge cases may still differ during development.

Q: How much faster is it in practice? A: Benchmarks on large projects show 5-10x speedup, varying by project size and complexity.

Q: Is this an official Microsoft project? A: Yes. It is developed by the TypeScript team at Microsoft.

Sources

Fil de discussion

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

Actifs similaires