NEWS

TypeScript 7.1 Beta Restores Compiler API and Speeds Up Type Checking in Vue and Svelte

TypeScript 7.1 Beta Restores Compiler API and Speeds Up Type Checking in Vue and Svelte
Image: Redação iMasters
News
Reading
4 min
Tables
1
In short

The beta release fixes what 7.0 had broken in July: the compiler's programmatic API. On top of that, it brings the tool that unlocks fast type checking in .vue and .svelte files.

Microsoft released the beta version of TypeScript 7.1 on October 20, 2026, announced by Daniel Rosenwasser and shared by the team in a post on X. It's the first update since TypeScript 7.0 replaced the compiler written in the language itself with a native Go compiler (known as tsgo), released in July 2026. The beta arrived two weeks later than planned, and the team expects to ship a release candidate and stable version by the end of November, according to InfoQ.

What Broke in July and What's Coming Back Now

When TypeScript 7.0 rewrote the compiler in Go, the programmatic API that other tools used to embed the compiler was left out. For three months, everything that depended on it, from Volar (Vue's language tooling suite) to Svelte, Astro, ts-morph, and type-checking linters, stayed stuck on version 6, unable to migrate to the new compiler.

TypeScript 7.1 Beta brings that API back, but not the old way. Instead of reviving a monolithic module, the team split the surface into focused entry points: typescript/sync, typescript/async, typescript/fs, and typescript/ast. These paths already existed behind an unstable prefix; now the prefix is gone, signaling that the API is ready for real use. The client also now models incremental edits through reusable snapshots, letting an editor derive a new state from a previous one without rebuilding everything from scratch. The team guarantees this surface will remain compatible across the entire 7.x series once the stable version ships.

Content Mappers: The Piece That Unlocks Vue and Svelte

The most talked-about feature in the beta isn't the API itself, but what it enables: content mappers. This is an officially supported plugin point that lets a package hand TypeScript a virtual view of a non-standard file, such as a .vue or .svelte file, mapping back to the original file so that errors point to the right line. Since the mapper runs in a separate process, it only executes when the developer opts in, and the team itself recommends treating this flag with the same caution as any build plugin.

The Vue ecosystem is already porting tools to this mechanism. Maintainer Johnson Chu released Vue Language Tools v4 in alpha, built on top of content mappers, replacing the separate vue-tsc binary with an @vue/content-mapper that runs inside tsc itself. This eliminates an extra process layer that historically made type checking in Vue projects slower than in plain TypeScript projects.

The Numbers: From 14 Seconds to 3

A hands-on migration report tested Vue Language Tools v4 alpha on the Directus admin panel, a project with 581 Vue components and 882 TypeScript files. Type checking dropped from 14.19 seconds to 3.10 seconds running tsc 7.1 with the mapper, a 4.6x speedup over vue-tsc 3. The same report warns that, until Vue tooling stabilizes on the final 7.1 release, teams will need to run 7.1 in CI while keeping an older TypeScript version in the editor.

Other benchmarks reinforce the pattern, with bigger gains in mid-sized projects than in very large, older codebases:

ProjectBeforeAfter (7.1 + mapper)Gain
Directus admin (Vue)14.19s3.10s4.6x
MUI docs (Microsoft)22.2s11.9s~1.9x, memory nearly halved
VS Codeown baselineslight improvement~1.2x
NestJS, 353k lines12.42s (old compiler) / 4.95s (7.0)2.76s (7.1)up to 4.5x vs. the old compiler

The independent NestJS test also confirms that 7.1 reverses a memory consumption regression that had appeared in 7.0.

What's Still Not Fully Ironed Out

Not everything is settled. On GitHub, developer Akira Higuchi reported that, in a specific editing flow, saving the configuration file watched by a mapper can leave types stale until the language server restarts. The issue remains open.

The language itself gains three additions that don't depend on any framework:

  • Import attributes (import attributes) in ambient module declarations;
  • Support for TC39 source phase imports, used to load WebAssembly;
  • A stable es2026 target, bringing Math.sumPrecise() and Error.isError().

What Changes for Developers in Brazil

For those still on TypeScript version 5, the team's own guidance is not to jump straight to 7: go through 6 first. Teams using Vue, Svelte, or Angular should keep a dual installation, TypeScript 6 and 7, until each framework's tooling publishes a build compatible with stable 7.1; this is exactly the scenario the Directus report describes in practice.

Authors of libraries and tools that embed the compiler (type-checking linters, documentation generators, IDE plugins) have a concrete reason to act now: port to the new entry points and report missing functions through the API's status tracker, while there's still time to fill gaps before the stable release ships. Putting off this migration means repeating, in 2027, the same three-month blackout that hit Vue, Svelte, Astro, and ts-morph in this cycle.

The independent numbers also shift the market's point of comparison: according to InfoQ, competing type checkers are now being measured on Hacker News against tsgo 7.1 beta's performance, not against the classic TypeScript compiler anymore. For those deciding on a stack today, this means the bar for type-checking speed has moved up, and it's worth re-evaluating old benchmarks before ruling out a migration to the native compiler.

Translated from the Brazilian Portuguese original · Read the original