Skip to content

TypeScript 7.1 Beta adds a new API and content mappers

TypeScript 7.1 Beta brings back a programmatic API for tools stuck on 6.0, adds content mappers for .vue files and type-checks up to 1.9x faster than 7.0.

By Tech AI Wire Team

3 min read

XLinkedIn
The TypeScript 7.1 Beta pre-release page on GitHub, tagged v7.1-beta, linking the announcement and listing 24 download assets.

By the numbers

faster type-checking on mui-docs than TypeScript 7.0
1.9x
less memory on the same codebase
49.6%
the npm version to test
7.1.0-beta

Microsoft released TypeScript 7.1 Beta on October 20, 2026. Its main job is to bring back a programmatic API, the hook that editor plugins and linters use to talk to the compiler. TypeScript 7.0 shipped without one, which left many popular tools stuck on TypeScript 6.0.

Why the API matters

TypeScript 7.0, released on July 8, 2026, was a rewrite of the compiler in the Go programming language. Microsoft says it is "somewhere around 10x" faster than TypeScript 6. But it shipped without the API that other tools build on.

That gap held back tools such as Volar, which powers Vue editor support, the Svelte language service, typescript-eslint and Angular's template checker, NT Compatible reports. Their users had to stay on TypeScript 6.0.

The 7.1 API is split into entry points such as typescript/sync, typescript/async, typescript/fs and typescript/ast, according to Microsoft's announcement. It uses snapshots to track changes and a virtual file system. Programs must now be closed explicitly when a tool is done with them. Each tool still needs its own update before teams can leave 6.0 behind.

Content mappers for Vue, Svelte and Astro

Many frameworks keep code in their own file types, such as .vue files that mix HTML, JavaScript and CSS. A content mapper is a plugin that turns such a file into virtual TypeScript, with a map back to the original lines. The editor can then check types and jump to definitions inside it.

Mappers are listed in tsconfig.json under contentMappers. Because they are programs TypeScript runs, they work only with the --runExternalCode flag. In VS Code they also need a trusted workspace and the js/ts.contentMappers.enabled setting. The post links early mappers for Vue, Svelte, Astro, MDX, Ember and CSS Modules.

New language features

The beta also adds features from new JavaScript standards:

FeatureWhat it does
Import attributes in ambient modulesdeclare module "*" with { type: "css" } types an import by its attribute, not its file name
Source phase importsimport source loads a module without running it, such as a WebAssembly.Module
es2026 target and libAdds Math.sumPrecise(), Error.isError(), Array.fromAsync(), Map.prototype.getOrInsert() and base64 and hex methods on Uint8Array
New esnext methodsPromise.allKeyed, Iterator.zip and Iterator.prototype.chunks, among others

Two changes may break existing code. Checks on distributive conditional types are stricter, which can raise errors such as "Type 'B' does not satisfy the constraint 'A'." Updated DOM type definitions may also change results.

Speed and memory against 7.0

Microsoft benchmarked five real codebases with four type-checking threads and no output files. Every one ran faster and used less memory than on TypeScript 7.0:

Codebase7.0 time7.1 Beta timeMemory saved
mui-docs22.2s11.9s49.6%
t3code-server26.5s19.1s24.6%
sentry19.6s15.1s20.8%
vscode21.6s17.7s17.2%
bluesky4.48s3.89s15.8%

Install it with npm install -D typescript@beta. The GitHub release lists the npm version as 7.1.0-beta. Microsoft plans a release candidate in "about a month" and the final release shortly after. NT Compatible gives planned dates of November 10 and November 24. Bun took a different route this month: its 1.4.3 release added bun check, its own TypeScript type checker.

What this means for developers

For many teams, 7.1 is the release that makes the move off TypeScript 6 possible.

  • Watch your tool vendors. If Volar, the Svelte language service, typescript-eslint or Angular keeps you on 6.0, follow their issue trackers for 7.1 API support. Your upgrade waits on theirs.
  • Run the beta in a branch now. Install typescript@beta and type-check your project. Look for new errors from the stricter conditional type rules before the final release.
  • Treat --runExternalCode like a dependency decision. Content mappers run code during type-checking. Enable it only for mapper packages you trust, and review that flag in CI.
  • Measure your own speedup. The 1.2x to 1.9x gains come from five codebases. Time tsc --noEmit on yours before and after.

Sources

  1. Announcing TypeScript 7.1 Beta - Microsoft DevBlogs
  2. TypeScript 7.1 Beta - GitHub
  3. TypeScript 7.1 Beta Released: New API Unblocks Vue, Svelte, and Angular Tooling - NT Compatible

Related articles

The weekly digest

One email every Friday with the week's top stories from all six desks: AI, dev tools, coding, the tech industry, startups and what's next. Free, no spam.

Unsubscribe anytime with one click.