Skip to content
Rafe Uddaraj

Why TypeScript 7 Was Ported to Go: The Compiler Under the Hood

27 min readEnglishRead in Bangla
On this page

Picture a developer on the VS Code team. They open a file that contains a type error and wait for the red squiggle to appear. One second. Five seconds. Ten. About 17.5 seconds later, the editor finally tells them what is wrong. Now multiply that wait by every file they open, every branch they check out, and every pull request that sits in a CI queue. At Slack, type checking in CI took about 7.5 minutes per run. Engineers there had stopped type checking locally and simply let CI do it, because the editor was almost unusable at their scale.

On 8 July 2026, that changed. TypeScript 7.0 shipped, and the same VS Code file shows its first error in under 1.3 seconds. Slack's CI type check dropped to about 1.25 minutes. Full builds became roughly 8 to 12 times faster. And the headline that spread across the internet was simple: Microsoft rewrote TypeScript in Go.

That headline is wrong, and the reason it is wrong is the most interesting part of the story. TypeScript 7 is not a rewrite. It is a port. Almost every decision the team made, including the choice of Go over Rust and over Microsoft's own C#, follows from that single word. In this article we will open the compiler up, walk through each stage, run small experiments that show exactly where JavaScript hits its ceiling, read the real Go source, and look at what the speed cost the ecosystem. By the end, you will understand not only why Go won, but how to make the same port-or-rewrite decision in your own systems.

If you enjoyed my deep dives into data structures and memory layout and OOP versus functional architecture, both will pay off here.

Table of Contents

The Timeline in One Picture

The project went public on 11 March 2025, when Anders Hejlsberg, the creator of TypeScript (and of C# before it), published A 10x Faster TypeScript (opens in a new tab). Six days earlier, Ryan Cavanaugh, the TypeScript development lead, had already pinned an FAQ titled Why Go? (opens in a new tab) in the new repository, because the team knew exactly which question was coming.

Timeline of the TypeScript Go port from the March 2025 announcement to the TypeScript 7.1 beta in October 2026
Timeline of the TypeScript Go port from the March 2025 announcement to the TypeScript 7.1 beta in October 2026

The rollout was deliberately slow and careful. Native previews shipped in May 2025 under a separate tsgo binary, so anyone could compare the two compilers on the same code. TypeScript 6.0, released on 23 March 2026, was the last version built on the JavaScript codebase, and it existed mainly as a bridge: it deprecated every option that 7.0 would later remove. The 7.0 beta arrived in April, the release candidate in June, and the final release on 8 July 2026. In October, the 7.1 beta brought back a programmatic API for tools.

The TypeScript 7.0 announcement on Microsoft DevBlogs, 8 July 2026
The TypeScript 7.0 announcement on Microsoft DevBlogs, 8 July 2026

Notice the wording in the announcement itself: a native port, written to keep "the structure and logic of the original codebase". Keep that phrase in mind; most of the decisions below follow from it.

A Compiler Written in the Language It Compiles

Since its early days, the TypeScript compiler has been written in TypeScript. Compiler engineers call this self-hosting, and it is a point of pride: the team uses its own language every day, so it feels every rough edge before users do. Internally, that JavaScript-based codebase is called Strada. The Go port is called Corsa.

Self-hosting has a hidden cost, though. The compiler is TypeScript, but it runs as JavaScript, inside a JavaScript engine such as V8. John Reilly and Ashley Claymore's LogRocket analysis (opens in a new tab) put it in a memorable way: the type checker is essentially an emulator of your program's behavior, and that emulator is itself being run by another emulator, the JavaScript engine. Two layers of abstraction sit between the type checking algorithm and the hardware.

For a small project, nobody notices. But the core compiler is roughly 150,000 lines of code, according to Jake Bailey's GopherCon 2025 talk (opens in a new tab), and modern codebases like VS Code feed it more than a million lines of input. At that scale, every layer of overhead turns into seconds, and seconds turn into minutes of CI time.

Inside the Factory: Five Stages and One Bottleneck

To understand why the port helps, we first need to know where the time goes. Every tsc run pushes your code through five stages:

  1. Scanner: reads raw text and produces tokens such as function, greet, (.
  2. Parser: turns the token stream into an Abstract Syntax Tree (AST).
  3. Binder: walks the tree, creates a symbol for every declared name, and wires up scopes.
  4. Checker: computes the type of every expression, resolves generics and overloads, and reports errors.
  5. Emitter: writes JavaScript files and .d.ts declaration files.
The TypeScript compiler pipeline from scanner to emitter, with Sentry measurements showing the checker takes most of the build time
The TypeScript compiler pipeline from scanner to emitter, with Sentry measurements showing the checker takes most of the build time

The numbers in the chart come from the Sentry codebase, measured by the TypeScript team in the native previews announcement (opens in a new tab). On TypeScript 5.8, parsing took 3.48 seconds and binding 1.77 seconds, while checking took 63.26 seconds, about 92% of the measured time.

Here is an analogy that will keep paying off. Think of a national exam. Parsing is photocopying the answer scripts. Each script is independent, so if you have a hundred photocopiers, you finish a hundred times faster. Checking is grading. A grader cannot judge one answer in isolation, because question 7 refers back to the formula defined in question 2, which lives in a different script. When file a.ts imports a type from b.ts, the checker has to understand b.ts too. That cross-file dependency is why checking is both the most expensive stage and the hardest one to split across workers.

The Checker Is Lazy

The checker does not compute every type up front. It works on demand: when it needs the type of user.profile.name, it resolves user, then profile, then name, caching each result. This makes it efficient on one thread, but it also means two workers checking different files will often end up computing the same shared types, such as everything in lib.d.ts. Remember this; it explains the memory numbers later.

The JavaScript Ceiling

If checking is the bottleneck, the obvious move is to run it on more CPU cores. Your laptop probably has eight or more. So why did the JavaScript compiler use only one?

JavaScript runs your code on a single thread with an event loop. Node.js does offer worker threads (opens in a new tab), but each worker lives in its own isolated heap. Workers cannot share ordinary objects. When you send an object to a worker with postMessage, Node runs the structured clone algorithm and gives the worker a copy.

Let me show you exactly what that means for a compiler. Here is a tiny AST with a parent pointer, sent to a worker:

JavaScript
// clone.mjs
import { Worker } from 'node:worker_threads';
class AstNode {
constructor(kind, parent = null) {
this.kind = kind;
this.parent = parent;
this.children = [];
}
isFunction() {
return this.kind === 'FunctionDeclaration';
}
}
const file = new AstNode('SourceFile');
const fn = new AstNode('FunctionDeclaration', file);
file.children.push(fn);
console.log('main: cycle intact? ', fn.parent.children[0] === fn);
const worker = new Worker(
`
const { parentPort } = require('node:worker_threads');
parentPort.once('message', (node) => {
parentPort.postMessage({
cycleIntact: node.parent.children[0] === node,
methodSurvived: typeof node.isFunction,
prototype: Object.getPrototypeOf(node) === Object.prototype ? 'plain Object' : 'AstNode',
});
});
`,
{ eval: true },
);
worker.once('message', (r) => {
console.log('worker: cycle intact? ', r.cycleIntact);
console.log('worker: isFunction is a ', r.methodSurvived);
console.log('worker: prototype is ', r.prototype);
worker.terminate();
});
worker.postMessage(fn);

Running it on Node.js 24 prints:

CONSOLE
$ node clone.mjs
main: cycle intact? true
worker: cycle intact? true
worker: isFunction is a undefined
worker: prototype is plain Object

The structured clone is clever: it preserves the cycle inside the copy. But the worker received a different object graph with no class and no methods, and it paid for a full copy. How expensive is that copy? I built a tree of 597,871 nodes, each with a parent pointer, and timed a single structuredClone on my Apple M1. Across three runs it took between 445 and 522 milliseconds, just to copy, before any type checking began. A real program's AST and symbol tables are far richer than my toy nodes, and the checker would need them in every worker.

What about SharedArrayBuffer? It is real shared memory, but MDN describes it as a raw binary data buffer (opens in a new tab). You can share bytes, not objects. To put an AST in it, you would have to re-encode every node, pointer, and string into a hand-rolled binary format, and rewrite all 150,000 lines of compiler code to read that format. At that point you would be writing a new compiler, not optimizing the old one.

Node.js workers must copy the syntax tree into each worker, while Go goroutines read one shared syntax tree
Node.js workers must copy the syntax tree into each worker, while Go goroutines read one shared syntax tree

Here is the kitchen version of the problem. Imagine a restaurant with four chefs, but each chef works in a separate locked room. To cook together, they have to photocopy the entire recipe book and slide it under the door every time. The photocopying takes longer than the cooking.

Even on a single thread, JavaScript leaves performance on the table for this specific workload. Ryan Cavanaugh explained on Hacker News (opens in a new tab) that the compiler does a huge amount of polymorphic property access, reading fields from many differently shaped node objects, which defeats V8's fast paths that assume objects of one shape. He estimated the Go version to be about 3.5x faster than equivalent TypeScript on a single thread. Almost every object is a separate heap allocation, the JIT needs time to warm up, and strings are stored as UTF-16 even though almost all source code is UTF-8.

The Real Ceiling

The JavaScript compiler was not slow because its authors wrote slow code. It was slow because its workload, a huge, pointer-rich, cyclic graph walked by many threads, is exactly the workload that JavaScript engines are not designed to share.

The Country Without a Constitution

So the team needed native code and real shared-memory threads. Plenty of languages offer both. Why not take the opportunity to redesign the compiler from scratch in the most modern language available?

Because of one fact that most articles skip: TypeScript has no specification. Jake Bailey made this point bluntly in his GopherCon talk. There was a language specification long ago, but it fell out of date, and he eventually deleted it from the repository because people kept citing it. Today, the specification of TypeScript is whatever those 150,000 lines of compiler code do. Every quirk, every edge case in overload resolution, every order in which union members are printed, is behavior that some codebase in the world depends on.

Imagine translating the legal code of a country that has no written constitution. Its law is the accumulated record of court rulings, each one interpreting the ones before it. You cannot "translate the intent" into an elegant new legal system, because the intent was never written down; only the rulings were. The safe way is to translate clause by clause, into a language whose grammar has the same shape as the original, so that any lawyer can put the old text and the new text side by side and confirm they say the same thing.

For readers who write Bangla, there is an even closer picture: transliterate, do not translate. When you write a Bangla sentence in Roman letters, every word keeps its exact meaning one to one. A translation into English might read more naturally, but it can never promise to mean exactly the same thing.

That is precisely the argument Ryan Cavanaugh makes in the pinned FAQ:

Ryan Cavanaugh's pinned "Why Go?" FAQ in the typescript-go repository, 5 March 2025
Ryan Cavanaugh's pinned "Why Go?" FAQ in the typescript-go repository, 5 March 2025

The core of his answer is that the team would maintain both codebases for a long time, so changes had to be portable between them, and idiomatic Go closely resembles the existing coding patterns of the TypeScript codebase. He openly admits that many languages would suit a ground-up rewrite. This was not one. Go, in his words, did the best "when considering multiple criteria that are particular to this situation."

Decision chain: no written spec means the compiler is the spec, which forces a port, which requires a language with the same code shape, garbage collection, shared memory and native code, which leads to Go
Decision chain: no written spec means the compiler is the spec, which forces a port, which requires a language with the same code shape, garbage collection, shared memory and native code, which leads to Go

Once you accept that it must be a port, the requirements write themselves. Bailey's talk lists them: native code, strong shared-memory concurrency, support for many platforms including WebAssembly, garbage collection, and a structure similar enough to TypeScript that the code can move across function by function. The candidates the team seriously considered included Rust, C#, Zig, and OCaml, plus C++.

The Candidates: Rust, C#, and Go

Why Not Rust

Rust is the obvious first guess. Many modern JavaScript tools, such as swc, oxc, Biome, and Rolldown, are written in it, and it produces outstanding native code. So what went wrong?

Think of a family tree. Rust's ownership model wants every value to have exactly one owner, like a strict household where every item belongs to exactly one person. A compiler's data, however, looks like a real family: children point to their parents, cousins point to each other, and everyone points back at the family name. Here is what a single line of code turns into inside the compiler:

How AST nodes, symbols and types point at each other in both directions, forming cycles
How AST nodes, symbols and types point at each other in both directions, forming cycles

Every AST node has a Parent pointer. Every symbol keeps a list of its declarations, and every declaration links back to its symbol. Every type points to its symbol, and in the Go port, even back to the checker that created it. Bailey's slides state the requirement directly: the compiler needs cycles, because it has parent pointers in its ASTs and types that are recursive.

Let me show you the friction in actual Rust. Here is the most direct translation of a parent pointer:

Rust
struct Node<'a> {
kind: &'static str,
parent: Option<&'a Node<'a>>,
children: Vec<Node<'a>>,
}
fn main() {
let mut file = Node { kind: "SourceFile", parent: None, children: vec![] };
let func = Node { kind: "FunctionDeclaration", parent: Some(&file), children: vec![] };
file.children.push(func); // the parent now owns a child that points back at it
println!("{} has {} child", file.kind, file.children.len());
}

And here is what rustc says:

CONSOLE
$ rustc --edition 2021 parent.rs
error[E0502]: cannot borrow `file.children` as mutable because it is also borrowed as immutable
--> parent.rs:10:5
|
9 | let func = Node { kind: "FunctionDeclaration", parent: Some(&file), children: vec![] };
| ----- immutable borrow occurs here
10 | file.children.push(func); // the parent now owns a child that points back at it
| ^^^^^^^^^^^^^^----^^^^^^
| | |
| | immutable borrow later used by call
| mutable borrow occurs here

To be fair to Rust, this does not mean cyclic graphs are impossible. Rust developers solve this every day, and the solutions are well known. The Rust Book (opens in a new tab) shows Rc<RefCell<T>> with Weak parent pointers. Real JavaScript tooling goes further: oxc allocates nodes in an arena and keeps parent links as numeric IDs in a separate column, and rust-analyzer uses typed arena indices. The swc project wrote down the pain in an architecture decision record (opens in a new tab): visitors could not see the parent node "due to ownership restriction of rust", so they built a separate path mechanism.

In Go a parent and child simply point at each other and the garbage collector cleans up; in Rust tools like oxc store nodes in an arena and keep parent links as indices in a separate column
In Go a parent and child simply point at each other and the garbage collector cleans up; in Rust tools like oxc store nodes in an arena and keep parent links as indices in a separate column

So the real cost of Rust was that every data structure in the compiler would have to be redesigned, and a redesigned compiler can no longer be compared line by line with the original. That breaks the one property the port depended on. On Hacker News, Ryan Cavanaugh even noted that the team's internal Rust and Go experiments performed within the margin of error (opens in a new tab) of each other on raw speed. Speed was not the deciding factor. Portability was.

The Lesson for Your Own Systems

When someone says "language X is faster", ask: faster to run, or faster to arrive at a correct result? For a port with no spec, the language that preserves the existing structure wins, even if another language could be marginally faster after years of redesign.

Why Not C#

This is the dramatic moment of the story. Anders Hejlsberg created C#. Microsoft has invested decades in .NET. When the announcement landed, part of the C# community read the choice of Go as a vote of no confidence, and the TypeScript team had to answer that question directly.

C# is a capable language. The problem was shape. C# is a class-first language, while the TypeScript checker is written as functions and plain data structures, with almost no classes at all. Ryan Cavanaugh made this point on Hacker News (opens in a new tab), adding that the Go and TypeScript versions are nearly indistinguishable when you place them side by side. Porting to C# would have meant reorganizing the code into an object-oriented design first. In interviews reported by DEVCLASS (opens in a new tab), Hejlsberg also pointed out that C# is bytecode first, and that its ahead-of-time native compilation did not yet cover every platform the team needed with the same maturity.

If you read my OOP versus functional programming deep dive, this will feel familiar. The paradigm a codebase is written in decides which languages it can later move to cheaply.

Why Go

Go checked every box at once, and it did so with almost no translation friction. Look at the original TypeScript definition of an AST node, taken from the TypeScript 6.0 source:

src/compiler/types.ts (TypeScript 6.0, simplified)
export interface Node extends ReadonlyTextRange {
readonly kind: SyntaxKind;
readonly flags: NodeFlags;
id?: NodeId; // Unique id (used to look up NodeLinks)
readonly parent: Node; // Parent node (initialized by binding)
}

And here is the same concept in the Go port, copied from internal/ast/ast.go in typescript-go:

internal/ast/ast.go (typescript-go)
type Node struct {
Kind Kind
Flags NodeFlags
Loc core.TextRange
id atomic.Uint64
Parent *Node
data nodeData
}

Same fields, same names, same meaning. A plain struct with a plain pointer to its parent. That is the "same code shape" requirement in five lines.

The other boxes:

  • Garbage collection that costs almost nothing here. Cavanaugh's FAQ makes a point that surprises many people: batch compilations can effectively skip garbage collection entirely, because the process exits at the end. Picture a restaurant that serves on paper plates during service and throws everything away at closing time, instead of washing dishes while the customers wait. In a batch build, process exit is the garbage collector.
  • Control over memory layout. Go lets the team decide how each struct is laid out, field by field, without making the whole codebase think about manual memory management.
  • Real shared-memory concurrency. Goroutines run on all cores and read the same AST through ordinary pointers. Nothing is serialized, nothing is copied. Bailey's talk is explicit that about half of the speedup comes from concurrency, and that the team probably would not have done the port at all without shared-memory concurrency.
  • Many platforms, including WebAssembly, with simple cross-compilation and one static binary per platform.

The very first experiment confirmed the direction. Hejlsberg hand-ported the scanner and parser first, and according to Bailey's slides, parsing came out about 5x faster with no optimizations at all, just the same code translated one to one.

Moving the Temple Stone by Stone

In the 1960s, the Abu Simbel temples in Egypt were in the path of a rising reservoir. Engineers cut the temples into numbered blocks, moved them to higher ground, and reassembled them stone by stone. Same building, better ground. That is the best description of how the TypeScript port was actually carried out.

How the port worked: TypeScript source goes through Jake Bailey's ts-to-go tool, engineers fix the generated Go, and the same test harness compares baselines until the outputs match
How the port worked: TypeScript source goes through Jake Bailey's ts-to-go tool, engineers fix the generated Go, and the same test harness compares baselines until the outputs match

The process, reconstructed from Bailey's slides and the team's interviews, looked like this:

  1. A hand-ported foundation. Hejlsberg wrote the scanner and parser in Go by hand, proving the approach and setting the conventions.
  2. A translation tool. Jake Bailey built ts-to-go (opens in a new tab), which he describes as a very hacky transformer. It uses the TypeScript compiler's own API, including type information, to read the compiler's source and emit Go that is syntactically valid but does not yet compile.
  3. Human repair. Engineers fixed the output by hand and redesigned the data structures that needed it. Bailey notes that about ten engineers did this work, most of them learning Go for the first time.
  4. The same tests, compared byte by byte. The Go compiler runs the same test suite and produces the same baseline files for types, errors, and emitted JavaScript. Any difference is a bug in the port, or a deliberate, documented change.

The results show how seriously the team took fidelity. The JavaScript suite had grown to nearly 99,000 tests, about two minutes on Bailey's machine and roughly fifteen in CI. The Go suite runs 125,288 tests in about 17.7 seconds on his machine. In December 2025, the team reported in Progress on TypeScript 7 (opens in a new tab) that out of roughly 20,000 compiler tests, about 6,000 produce errors under TypeScript 6.0, and TypeScript 7 also produced errors in all but 74 of them, each a known gap or an intentional change.

The craft details are worth a look too, because they show what a port still has to re-engineer:

  • Allocation pooling. Profiling showed that identifiers alone accounted for about 37% of all allocations during parsing. Pooling them per parser cut allocations when parsing checker.ts by about 96%.
  • UTF-8 positions. JavaScript stores strings as UTF-16, but Go strings are UTF-8. Every text position in the compiler had to be audited, because a character offset in one encoding is a different number in the other.
  • Help from the Go team. Compiling the huge checker package was slow at first. A pair of Go compiler changes sped up compiling that package by about 5x and shipped in Go 1.25.

Under the Hood of the Go Compiler

Let us now look at how the Go port turns all those cores into speed, using the actual source of typescript-go (opens in a new tab). (In September 2026 the repository was archived and development moved back into the main TypeScript repository, but the code is the same.)

The first trick is memory. Instead of allocating every node or symbol separately, the compiler hands them out from arenas: big slabs that grow in size classes.

internal/core/arena.go (typescript-go)
type Arena[T any] struct {
data []T
}
func (a *Arena[T]) New() *T {
if len(a.data) == cap(a.data) {
nextSize := nextArenaSize(len(a.data))
a.data = slices.Grow[[]T](nil, nextSize)
}
index := len(a.data)
a.data = a.data[:index+1]
return &a.data[index]
}

The node factory keeps one arena per node kind, and the checker keeps arenas for symbols and signatures. Unlike the index-based Rust pattern we saw earlier, New() returns a real pointer, so the rest of the code keeps using ordinary pointers, cycles and all. Go gets the allocation speed of an arena without giving up pointer-shaped code.

The second trick is the parallel pipeline:

  • Parsing runs one goroutine per file through a small work group.
  • Binding runs one goroutine per file, and each file is bound exactly once.
  • Checking runs on a fixed pool of checkers.
The checker pool: one shared read-only AST and symbol table, four checkers that each build their own types and caches, and diagnostics sorted at the end so output is identical every run
The checker pool: one shared read-only AST and symbol table, four checkers that each build their own types and caches, and diagnostics sorted at the end so output is identical every run

After binding, the AST and the binder's symbols are effectively read-only, so every checker can read them at the same time without locks. Each checker, however, builds its own types, its own caches, and its own merged view of global symbols. That is the exam hall again: each grader gets their own answer key. It costs memory, because shared types such as everything in lib.d.ts get built once per checker, but it means the checkers never wait for each other.

Here is how the pool decided which checker gets which file in TypeScript 7.0, from internal/compiler/checkerpool.go:

internal/compiler/checkerpool.go (as shipped in 7.0)
checkerCount := 4
if program.SingleThreaded() {
checkerCount = 1
} else if c := program.Options().Checkers; c != nil {
checkerCount = *c
}
checkerCount = max(min(checkerCount, len(program.files), 256), 1)
// ... later, once the checkers exist:
for i, file := range p.program.files {
p.fileAssociations[file] = p.checkers[i%checkerCount]
}

Simple round robin: file 0 to checker 0, file 1 to checker 1, and so on. The default is four checkers, --singleThreaded forces one, and --checkers N overrides it, capped at 256 and at the number of files.

Round robin has a weakness that the exam analogy predicts. If two files import each other but land on different checkers, both checkers build the same types. In August 2026, a month after 7.0 shipped, the team replaced it in pull request #4313 (opens in a new tab) with a weighted version of FENNEL, a streaming graph partitioning algorithm from the research literature. Files are vertices, imports are edges, and the goal is to keep files that import each other on the same checker while keeping the load balanced. The comments in that code are a rare honest record of tuning: with four checkers and a naive order, per-checker times on the MUI docs project ranged from about 0.6 seconds to 19 seconds. One unlucky checker can hold the entire build hostage.

Determinism Has a Price

Since each checker computes types in its own order, the team had to work to keep output identical across runs. Diagnostics are collected per file, then sorted and deduplicated. The 7.0 release notes still warn that, in rare cases, changing the number of --checkers can surface order-dependent results, and suggest pinning the value across machines. That is also why TypeScript 6.0 introduced --stableTypeOrdering: it makes the old compiler order types the way the new one does, so their outputs can be compared.

Where Does 10x Actually Come From?

Here are Microsoft's official full-build numbers from the TypeScript 7.0 announcement (opens in a new tab), with the default of four checkers:

Full build times, TypeScript 6 versus TypeScript 7 with four checkers: VS Code 125.7 to 10.6 seconds, Sentry 139.8 to 15.7, Bluesky 24.3 to 2.8, Playwright 12.8 to 1.47, tldraw 11.2 to 1.46
Full build times, TypeScript 6 versus TypeScript 7 with four checkers: VS Code 125.7 to 10.6 seconds, Sentry 139.8 to 15.7, Bluesky 24.3 to 2.8, Playwright 12.8 to 1.47, tldraw 11.2 to 1.46

With --checkers 8, VS Code builds in 7.51 seconds, a 16.7x speedup, and the same post reports memory use falling by 6% to 26% across these codebases. The editor numbers matter even more for daily life: time to first error in VS Code went from about 17.5 seconds to under 1.3 seconds, and Canva reported going from about 58 seconds to about 4.8 seconds.

So where does the speedup come from? The team's answer, from Bailey's slides and Hejlsberg's interviews, is roughly half native code and half concurrency: about 3x to 4x from running native Go on a single thread, multiplied by about 2x to 4x from parallelism. But independent measurements show that your mileage depends heavily on your hardware and your code:

SourceCodebaseResultWhat it teaches
Microsoft, 7.0 release (opens in a new tab)VS Code, Sentry, and others7.7x to 11.9xLarge codebases on a strong machine
Prisma (opens in a new tab)Prisma Console monorepoabout 74s to 24s, roughly 3xtsc is only one part of CI
Mergify (opens in a new tab)244k lines13.1s to 3.46s, about 3.8xA 2 vCPU CI runner cannot use 4 checkers
VS Code team (opens in a new tab)VS Code main sourcetsc --noEmit 36s to 5sWatch mode went from about 80s to about 20s

This is Amdahl's law in action. If type checking is only part of your pipeline, speeding it up by 10x speeds up the whole pipeline by much less. Prisma saw exactly that. And parallelism can only help if there are cores to run on: Mergify points out that a CI runner with two vCPUs simply cannot benefit from the default four checkers.

Turn Minutes Into Money

Before you migrate, estimate the value with your own numbers: minutes saved per CI run, times runs per day, times your price per CI minute, plus the developer time spent waiting for the editor. Microsoft's release post cites its own News Services team saving 400 hours a month of waiting for CI. Your number will be different, so measure it rather than assuming 10x.

The Price of Speed: What Broke

A port this large always has a bill, and TypeScript 7.0 paid it in tooling. The biggest item: TypeScript 7.0 shipped without a programmatic API and without language service plugins. Any tool that imports typescript and calls the compiler from JavaScript could not run on 7.0.

A typescript-eslint issue reporting that TypeScript 7.0.2 fails its peer dependency range, closed as a duplicate of the TypeScript 7 tracking issue
A typescript-eslint issue reporting that TypeScript 7.0.2 fails its peer dependency range, closed as a duplicate of the TypeScript 7 tracking issue

The most visible casualty was typescript-eslint. Its published peer dependency only allows TypeScript below 6.1, and its maintainers stated plainly that nothing can be done until TypeScript 7 provides an API. The tracking issue is #10940 (opens in a new tab).

ToolStatus after 7.0Recommended path
typescript-eslintBlocked on the APIKeep TypeScript 6 for linting
Vue, Svelte, Astro, MDX editor toolingNot supported in 7.0TypeScript 6 in the editor, 7.1 content mappers are coming
AngularUses compiler transforms 7.0 removedTypeScript 7 for CLI type checking, TypeScript 6 for templates and editor
Bundlers that strip types (esbuild, swc, Vite, Bun)UnaffectedThey never type check, so they get no faster either

Microsoft's answer is to run both compilers side by side. The @typescript/typescript6 package provides a tsc6 binary and re-exports the 6.0 API, so your linter keeps using TypeScript 6 while your CI type check uses TypeScript 7. The 7.1 beta then brings a new API, split into typescript/sync, typescript/async, and AST helpers. Because the compiler now runs as a separate Go process, API objects are disposable: if you forget to dispose them, memory leaks on the Go side.

There is also a migration cost in the language settings. TypeScript 6.0 changed defaults, such as strict now being on, and deprecated older options. In 7.0, those deprecations became hard errors: target: es5, baseUrl, the node10 and classic module resolution modes, AMD, UMD, and SystemJS modules, outFile, and import asserts are all gone, and ignoreDeprecations no longer helps. Prisma's migration story is a good, honest checklist of the small things that broke, from path aliases that relied on baseUrl to a script that used the old compiler API.

The Irony Nobody Planned

Step back and look at the wider picture. Over the last few years, JavaScript tooling has been steadily moving to native languages: esbuild in Go, then swc, oxc, Biome, and Rolldown in Rust. Python saw the same thing with Ruff and uv. TypeScript 7 fits the trend with one big difference: it is the official compiler porting itself, not a third party building a faster replacement.

And here is the twist. The Rust ecosystem never produced a complete TypeScript type checker of its own. So when the Rust-based linter Oxlint wanted type-aware lint rules, it did not write a checker in Rust. It shipped tsgolint (opens in a new tab), a Go program that sits on top of the TypeScript 7 internals. Meanwhile, Angular is building a Rust-based preprocessor on top of Oxc to work around the transforms that 7.0 removed, as InfoQ reported (opens in a new tab). Rust tools now call Go for types, and Go-powered TypeScript sits underneath Rust-powered tooling. In practice, each layer of the toolchain ended up in the language that suits it.

Hands-On Lab: Measure It on Your Own Project

Do not trust anyone's benchmark, including mine. Here is a ten-minute lab to measure the difference on your own codebase.

First, install TypeScript 7 and keep TypeScript 6 next to it:

Terminal
npm install -D typescript@7 @typescript/typescript6

Run a full type check with each compiler and collect detailed timings:

Terminal
npx tsc6 --noEmit --extendedDiagnostics
npx tsc --noEmit --extendedDiagnostics

Compare the Parse, Bind, and Check times, plus memory. Then explore how your project responds to parallelism:

Terminal
npx tsc --noEmit --extendedDiagnostics --singleThreaded
npx tsc --noEmit --extendedDiagnostics --checkers 8

The single-threaded run tells you how much comes from native code alone. The eight-checker run tells you how much more your machine can extract, and how much extra memory it costs.

Before You Switch CI

If TypeScript 6 rejects your config because of deprecated options, fix those first, while you can still see the deprecation warnings. Pin --checkers to the same value everywhere, check how many vCPUs your CI runners really have, and keep linting on tsc6 until your lint tooling supports the new API.

Myths Worth Retiring

"TypeScript is now written in Go, so I have to learn Go." No. You write TypeScript exactly as before. Only the program that checks your code changed.

"They rewrote TypeScript." No. They ported it, function by function, and verified it against the old compiler's test baselines. That distinction is the whole point.

"This proves Go is faster than Rust." No. The team's own Rust and Go experiments were close on speed. Go won on portability for this specific codebase.

"My Vite or Bun build will get 10x faster." Probably not. Those tools strip types without checking them. TypeScript 7 speeds up type checking, editor feedback, and tsc builds.

Recap: A Port or Rewrite Decision Framework

TypeScript 7 is a story about constraints, not about languages. The compiler had no spec, so its behavior was the spec. That forced a port. A port demanded a language with the same code shape, a garbage collector for cyclic graphs, and real shared-memory threads. Go was the only candidate that satisfied all of them at once.

You can reuse that reasoning the next time someone proposes rewriting a critical system:

  • Is the behavior written down anywhere besides the code? If not, the code is the spec, and you should port, not rewrite.
  • Does the target language preserve the existing structure? If moving requires redesigning every data structure, you lose the ability to verify the result line by line.
  • Can you run the old tests against the new code? A shared test harness is what turns a risky rewrite into a measurable port.
  • Where does the time actually go? Measure first. TypeScript's checker was most of the compiler; your bottleneck may be somewhere else entirely.
  • What will break around it? Plan for the ecosystem. TypeScript solved it with side-by-side installs and a new API.

The fastest code is not always written in the fastest language. Sometimes it is written in the language that lets you carry every stone to higher ground without losing a single one.

References

All articles

Get in touch

Questions about a video, an article, or working together.