Edited by humans. Written by AI. How our editing works
All articles

TypeScript Is Getting Rewritten in Go. Here's Why That Matters

Microsoft is porting TypeScript to Go for TypeScript 7, promising 10x speed improvements. Here's what developers need to know about versions 6 and 7.

Yuki Okonkwo

Written by AI. Yuki Okonkwo

February 21, 20266 min read
Share:
Daniel Rosenwasser announces TypeScript 6.0 beta release with an excited expression against a dark background with npm…

Photo: Theo - t3․gg / YouTube

There's a peculiar problem that happens when you fix something in software: success breeds new problems you never anticipated. TypeScript solved JavaScript's reliability issues so effectively that it expanded the entire category of what JavaScript could be used for—which means TypeScript now faces challenges it was never designed to handle.

The TypeScript team just dropped the beta for version 6, and here's the twist: it's essentially a cleanup operation preparing for version 7, which will be written in an entirely different language. Not Rust, not C++—Go. And this decision reveals something fascinating about where TypeScript is actually struggling.

The success problem

When Microsoft built TypeScript, the goal was straightforward: make JavaScript workable at enterprise scale. As developer Theo Browne explains in his recent breakdown, "TypeScript was built because Microsoft wanted to use JavaScript at Microsoft scale, which might sound like nonsense, but it does make sense when you realize how many millions of lines of code Microsoft puts out every single week."

It worked. TypeScript made JavaScript viable for massive codebases by adding type safety and catching errors before they hit production. But here's where it gets interesting: by solving that problem, TypeScript inadvertently expanded what JavaScript could be used for in the first place.

Before TypeScript, JavaScript had a fairly limited range. You could build small web apps, but anything requiring serious reliability, performance, or scale needed a "real" language. TypeScript pushed that boundary way to the right. Now we have full-stack type safety, TypeScript running on servers, TypeScript in desktop apps via Electron. Someone even built Doom entirely in TypeScript's type system—not the game in TypeScript, but rendering frames of Doom using only the type system, which is Turing complete. (Yes, really.)

The problem? TypeScript solved issues for small web apps, but now those small web apps have become massive TypeScript monoliths. And TypeScript compilation is slow.

The 55,000-line file

Here's a detail that kind of breaks your brain: the majority of TypeScript's type checking happens in a single 55,000-line file. It's 3 megabytes of text. GitHub errors out when you try to view it. Most editors struggle to even open it.

This file is the core of what we think of as "TypeScript"—all that lovely type inference, all those helpful error messages. And it's written in TypeScript itself, which sounds elegant until you realize JavaScript is a terrible language for writing compilers.

"JavaScript strengths around its event loop are great for weird async workloads like requests coming in, database calls being waited for," Browne notes. "It is not good at these types of fixed top bottom workflows like a compiler. It just isn't good at that."

At Twitch, Browne's team rebuilt their web app in TypeScript and React. Two years in, it took 5 minutes from running npm run dev to actually seeing the dev environment. Five. Minutes. That's not a tooling problem—that's a fundamental architecture problem.

Why Go, not Rust?

The decision to port TypeScript to Go is fascinating because Rust seems like the obvious choice for a performance-critical rewrite. Rust is faster, more memory-safe, beloved by systems programmers. So why Go?

The answer comes down to two things: garbage collection and shared memory.

Rust's lack of garbage collection means predictable performance—if something takes 1ms, it always takes 1ms. Go has a garbage collector, which means occasional unpredictable pauses. For real-time systems, that's a dealbreaker.

But for compilers? "Do you know who doesn't care about those random spikes? Compilers," Browne explains. "Compilers don't care about the exact frame the thing is done on. Compilers care about doing things as efficiently as possible, reasonably speaking."

The second reason is multi-threading. TypeScript needs multiple threads editing the same memory simultaneously. Rust's entire safety model fights against this—that's kind of the point of Rust. Go doesn't care. For a compiler that needs to coordinate multiple passes across a massive codebase, Go's flexibility matters more than Rust's guarantees.

The 6-to-7 bridge

So what's TypeScript 6 actually for? It's the last version based on the current JavaScript codebase. Microsoft describes it as "the bridge" to version 7.

The TypeScript team faces a maintenance nightmare: they're building a completely new Go-based compiler that needs to be functionally identical to the existing TypeScript compiler, while simultaneously maintaining the old JavaScript-based version. Every quirk, every edge case, every bit of technical debt in the current version makes keeping these two implementations aligned harder.

TypeScript 6 is about trimming the weird stuff. Better defaults. Cleaner inference rules. Removing legacy behaviors that made sense in 2014 but are just baggage now. The goal is to get version 6 aligned enough with the Go version that by end of year, they can deprecate the JavaScript codebase entirely and go all-in on Go for version 7 and beyond.

The Go version already exists and is being used in production. It's 10x faster than the current TypeScript compiler. It also crashes sometimes and has memory leaks, but that's kinda the point of a beta. The performance gains are real enough that teams are already using it despite the rough edges.

What this means for developers

For most TypeScript users, the version 6 beta won't feel revolutionary. The changes are mostly about alignment, cleanup, and setting up for the future. But version 7? That's where the gains materialize.

Microsoft is focusing on three things: better defaults (both for humans and for AI agents—yes, they're explicitly designing for AI tooling now), dramatically faster type checking, and better error messages when things go wrong.

That last one matters more than you might think. When TypeScript's type inference breaks, the error messages can be incomprehensible. For an AI agent trying to fix code, or a junior dev trying to understand what went wrong, those error messages are the entire interface for learning. Better errors mean TypeScript becomes more accessible, which expands who can use it effectively.

The TypeScript rewrite reveals something about modern software development: success creates new constraints. TypeScript worked so well that it outgrew its own architecture. The solution isn't to abandon it—the ecosystem is too valuable, the developer experience too refined. Instead, you rebuild the foundation while maintaining the surface.

That's a harder problem than starting fresh. But it's also the only way forward when you've become infrastructure.

From the BuzzRAG Team

We Watch Tech YouTube So You Don't Have To

Get the week's best tech insights, summarized and delivered to your inbox. No fluff, no spam.

Weekly digestNo spamUnsubscribe anytime

More Like This

Man with dark hair against black background with white text introducing Composer 2, a Kimi K2.5 fork, with Cursor logo…

Cursor's Composer 2 Built on Kimi: Brilliant or Sketchy?

Cursor's impressive new AI coding model turns out to be built on Moonshot AI's Kimi K2.5. The economics and licensing make this story complicated.

Marcus Chen-Ramirez·4 months ago·6 min read
Bearded man with surprised expression holds a bright yellow banana labeled "Nano banana" against a purple curtained…

Google's Imagen 3 Just Broke News Before the Reporters

Google's Imagen 3 image generator pulled breaking news into an infographic before journalists knew it existed. We tested speed, accuracy, and guardrails.

Yuki Okonkwo·4 months ago·5 min read
Man in ORCDEV shirt with surprised expression next to calendar, AI head icon, and text "All Your AI Coding Limits In One…

Five Open Source Dev Tools That Shouldn't Be Free

From AI usage trackers to self-hosting platforms, these open source tools solve real developer problems—and they're completely free.

Yuki Okonkwo·5 months ago·6 min read
A man with a surprised expression stands next to a colorful 3D "CSS WRAPPED 2025" graphic featuring a blue character…

CSS Revolution: 2025's Game-Changing Features

Explore 2025's CSS advancements reshaping web dev with new features, APIs, and customization options.

Yuki Okonkwo·7 months ago·3 min read
Man with skeptical expression next to arrow pointing from Next.js logo to tropical island scene icon

Navigating Framework Shifts: From Next.js to TanStack

Exploring the migration from Next.js to TanStack Start in T3 Chat for scalability and performance.

Bob Reynolds·6 months ago·3 min read
Man with surprised expression next to text reading "Code Is Cheap Now. Software Isn't." dated Jan 10, 2026

Is Code Cheap but Software Priceless?

Coding is easy, but real software is tough. Discover the shift to disposable software and what it means for developers.

Yuki Okonkwo·6 months ago·3 min read
Skeptical man with beard next to glowing AI box with arrow pointing to broken red bug icon, with text "AI FIX THIS? STILL…

AI Can Write Code, But Can It Make Software Stop Sucking?

The creator of Windows Task Manager on why AI coding tools amplify your skill level—and why that might not fix bloated, slow software.

Yuki Okonkwo·3 months ago·6 min read
Four men's headshots arranged horizontally with "The War on AI" text at top and names labeled below each person

Opus 4.7 Drops Amid Molotov Cocktails and AI Fear

Anthropic's Opus 4.7 launches as a 20-year-old throws a Molotov cocktail at Sam Altman's house. The AI world is splitting in two—and it's getting violent.

Yuki Okonkwo·3 months ago·6 min read

RAG·vector embedding

2026-04-15
1,422 tokens1536-dimmodel text-embedding-3-small

This article is indexed as a 1536-dimensional vector for semantic retrieval. Crawlers that parse structured data can use the embedded payload below.