RC RANDOM CHAOS

TypeScript 7 ships: Go rewrite makes the compiler roughly 10x faster

· via Hacker News

Original source

TypeScript 7

Hacker News →

Microsoft has released TypeScript 7, a ground-up native port of the compiler and language service rewritten in Go. Rather than reinventing the type system, the team reimplemented the existing codebase’s structure and logic in native code, adding shared-memory multithreading and other optimizations. The payoff is a reported 8x–12x speedup on full builds, with equal or lower peak memory use. It installs the same way as before via npm install -D typescript, exposing a new native tsc, and editors get support through a new Language Server Protocol implementation.

The more visible win is interactivity. Microsoft cites the VS Code codebase, where the time from opening the editor to seeing the first type error dropped from about 17.5 seconds to under 1.3 seconds, and says the new language server cut failing language-service commands by over 80% and crashes by over 60% versus TypeScript 6. Adoption feedback from large teams reinforces the numbers: Slack reports CI type-checking falling from roughly 7.5 minutes to 1.25 minutes and 40% less merge-queue time, Vanta saw up to 9x faster builds, and Microsoft’s News Services team claims 400 saved CI hours a month. Companies including Bloomberg, Canva, Figma, Google, Notion, Sentry, and Vercel tested it against production codebases.

The main caveat for tooling authors is that 7.0 ships without a programmatic API—that’s slated for a different API in 7.1. Until then, tools that import TypeScript directly (like typescript-eslint) can keep using the 6.0 API through a new @typescript/typescript6 compatibility package, which provides a tsc6 binary and can be wired in via an npm alias so the fast tsc and the legacy API coexist.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.