TypeScript 7.1 Beta Adds Source Phase Imports, a Stable ES2026 Target, Content Mappers and a New API
Microsoft's TypeScript 7.1 beta, announced October 20, adds source phase imports, import attributes in ambient modules, es2026 and content mappers; a release candidate is due in about a month.
Overview
Microsoft has released the beta of TypeScript 7.1. According to the TypeScript team blog, post by Daniel Rosenwasser, Principal Product Manager, published on October 20, 2026, the beta adds import attributes in ambient modules, source phase imports, a stable es2026 target, a new programmatic API and a plugin point called content mappers. It follows the 7.0 line that The Machine Herald previously reported.
The post opens with “Today we’re excited to announce the beta release of TypeScript 7.1!” and gives npm install -D typescript@beta as the install command, per the TypeScript team blog.
What Is in the Beta
Import attributes in ambient modules. The TypeScript team blog says 7.1 lets developers declare import attributes directly in ambient module declarations, so type-checking can account for required metadata such as type: "css" or type: "text".
Source phase imports. The release supports the ECMAScript source phase imports proposal, which adds a source keyword after import, according to the TypeScript team blog. The post presents WebAssembly instantiation as a main use case. The implementing pull request, Support source phase imports by Oleksandr Tarasiuk, was merged on October 2, 2026 and covers static import source syntax and dynamic import.source() calls, along with WebAssembly typing.
ES2026 target. The TypeScript team blog says es2026 is now supported as a stable --target and --lib option. Library additions it names include Math.sumPrecise(), Iterator.concat() and JSON.rawJSON().
A new API. The blog says 7.1 ships a new API for building tools on TypeScript’s syntactic and semantic analyses, organized into entry points named typescript/sync, typescript/async, typescript/fs and typescript/ast.
Content mappers. The blog describes content mappers as a plugin point registered against a file extension that can produce a virtual representation of a file for TypeScript to analyze, with Vue, Svelte and Astro single-file components as the target use case. The implementing pull request, Content mappers by Andrew Branch in the typescript-go repository, was merged on August 19, 2026. It describes mappers configured in tsconfig.json by file extension, package name and options, communicating with TypeScript over JSON-RPC on STDIO, and working with --incremental, --build and --watch modes.
Performance Figures
The TypeScript team blog reports benchmarks run with four type-checker threads and --noEmit. Check times it lists:
- bluesky: 4.48s to 3.89s (1.2x faster)
- mui-docs: 22.2s to 11.9s (1.9x faster)
- sentry: 19.6s to 15.1s (1.3x faster)
- vscode: 21.6s to 17.7s (1.2x faster)
Memory use fell in the same runs, for example from 8,093 MiB to 4,079 MiB on mui-docs (49.6%) and from 2,017 MiB to 1,698 MiB on bluesky (15.8%), per the same post. These are Microsoft’s own measurements on the projects it chose.
What Comes Next
The TypeScript team blog says the team will focus on speed and stability, including feedback on the beta, “followed by a Release Candidate in about a month from now” and a final release shortly after that. No exact dates for the release candidate or the stable version were given in the post.
What We Don’t Know
The sources reviewed do not say how many third-party framework tools have published content mappers, or when editor integrations for them will be available. The benchmark figures have not been independently reproduced in the sources reviewed.