TypeScript's Go Rewrite Officially Merges Into the Main Repository

Khanh Nguyen
Khanh Nguyen
(Updated: )
Listen to this article0 / 0
Vector illustration of mechanical hands locking a glowing blue and amber core into an industrial server. Photo: AI/BytePith

Microsoft folded roughly a year and a half of native Go development back into microsoft/TypeScript on August 20, replaying 2,495 commits to keep the project's git history, blame, and authorship intact rather than starting the record over.

Microsoft Folds the Go Rewrite Back Into microsoft/TypeScript

The change landed as a pull request from TypeScript maintainer Jake Bailey, merged into microsoft:main on August 20 as commit 6d44e05. Its stated purpose is direct: bring over the entirety of the separate microsoft/typescript-go staging repository and return main TypeScript development to the original repo. A companion issue, microsoft/typescript-go#4918, tracks the other side of that transition on the repo being retired.

Reviewer Andrew Branch approved the change with a short, three-word comment: "Welcome home, everyone." It captures what the PR does in practical terms. For a year and a half, TypeScript's actual compiler work happened in a satellite repository while microsoft/TypeScript kept the older JavaScript implementation. That split is now closed.

How the Migration Preserves 13 Years of Git History

The mechanics matter more than the headline suggests. Rather than copying the current state of typescript-go into microsoft/TypeScript as a fresh commit, the team replayed its entire commit history into the target repo, preserving individual authorship and line-by-line blame. Every reference to another pull request or issue inside those replayed commit messages was rewritten to point at the correct repository, so a historical commit message citing microsoft/typescript-go#1234 still resolves correctly after the move.

That history was placed into a tsc subdirectory, which now serves as the project's main Go module. Microsoft kept it deliberately unversioned and without an exported API for the moment, partly to avoid colliding with microsoft/TypeScript's existing git tags, which were built around the old JavaScript release cadence. The replayed history was then merged into main, which deleted the prior JavaScript-based implementation, known internally as "Strada," except for files the team wanted to retain: licenses, build scripts, and GitHub Actions workflows. A handful of fixup commits followed to rename imports and relocate files so the combined repository actually builds.

Bailey's PR description was explicit that the merge had to happen as a real merge commit, not a squash, or the effort spent keeping that history alive would be lost entirely. That is a different tradeoff than the one behind Bun's own from-scratch rewrite of a million lines from Zig to Rust in six days, which replaced a codebase outright rather than carrying its prior lineage forward commit by commit. TypeScript's approach cost more engineering time up front specifically to keep thirteen years of authorship and blame queryable after the switch.

The Performance Case That Started the Rewrite in 2025

The reason any of this happened traces back to a March 11, 2025 post from Microsoft technical fellow Anders Hejlsberg, announcing what the team internally called Corsa: a native port of the TypeScript compiler and tools, aimed at large codebases where the JavaScript-based compiler was slow to load and check. The post said the port would "drastically improve editor startup, reduce most build times by 10x" and cut memory use substantially.

To back that up, Microsoft published wall-clock tsc timings across six real open-source codebases, comparing the then-current JavaScript compiler against the early native Go build.

TypeScript's Go Port Compiled Test Codebases 9-14x FasterHorizontal bar chart of compiler speedup multipliers for six open-source codebases when built with the Go-native TypeScript compiler instead of the JavaScript-based compiler, per Microsoft's March 2025 benchmark.TypeScript's Go Port Compiled Test Codebases 9-14x FasterCompiler wall-clock time, six codebases, JavaScript build vs. Go-native build (March 2025 benchmark)0x5x10x15xVS Code (1.5M LOC)10.4xPlaywright (356K LOC)10.1xTypeORM (270K LOC)13.5xdate-fns (104K LOC)9.5xtRPC (18K LOC)9.1xrxjs (2.1K LOC)11.0xSource: Microsoft TypeScript DevBlogs, "A 10x Faster TypeScript," March 11, 2025 - not independently reproduced

The same post reported that loading the VS Code codebase in an editor dropped from about 9.6 seconds to about 1.2 seconds, and that overall memory use looked roughly halved, though Microsoft cautioned it hadn't yet actively optimized for memory at that point. Those figures predate a feature-complete compiler and haven't been independently reproduced since; the June 2026 release-candidate post repeats the same "about 10 times faster" framing rather than publishing an updated table.

A Year and a Half from Announcement to Merge

The March 2025 announcement set off a staged rollout rather than a single cutover. A first native preview package, distributed as @typescript/native-preview with a tsgo binary, shipped two months later. By December 2025, Visual Studio Magazine reported the compiler and language service were stable enough for everyday editor and command-line use, with near-complete type-checking parity against the JavaScript version, and that TypeScript 6.0 would be the final release built on the original codebase. TypeScript 7.0 reached release-candidate status on June 18, 2026, installable through the standard typescript npm package rather than the separate preview package, with Microsoft's RC post calling it a release built on "a completely new foundation."

From Native Preview to Merged Reality: The TypeScript-to-Go TimelineTimeline of six milestones in the TypeScript-to-Go rewrite, from the March 2025 announcement through the August 20, 2026 merge of typescript-go into the main TypeScript repository.From Native Preview to Merged Reality: The TypeScript-to-Go TimelineKey milestones from the March 2025 announcement to today's repository migrationMar 11, 2025Native Go portannounced by HejlsbergMay 2025"tsgo" native previewships via npmDec 2025Compiler reachesdaily-use stabilityEarly 2026TypeScript 6.0 ships asfinal JS-based releaseJun 18, 2026TypeScript 7.0 RClands in typescript@rcAug 20, 2026typescript-go mergesinto microsoft/TypeScriptSources: Microsoft TypeScript DevBlogs; Visual Studio Magazine; GitHub PR #63763

Today's merge doesn't mean the transition is finished. TypeScript 7.0 stable is still expected roughly a month out from the RC, and Microsoft has said a stable programmatic API for tools that import TypeScript as a library won't arrive until at least TypeScript 7.1. A compatibility package, @typescript/typescript6, exists specifically so tools like typescript-eslint can keep using the TypeScript 6.0 API while running the new tsc binary underneath. For most people who just run tsc on their own projects, the switch is close to complete. For anyone building tooling on top of the compiler, the current repository merge is a structural milestone, not the finish line.

Comments (0)

Sort by:

No comments yet.

Be the first to share your perspective on this topic.