TypeScript 7.1 Beta adds import attributes in ambient modules, content mappers and a new API
The beta also stabilizes the es2026 target and reports faster type-checking and lower memory use than TypeScript 7.0 on five codebases.
Microsoft has released the beta of TypeScript 7.1, installable with npm install -D typescript@beta. The post from the TypeScript team lists language, library and tooling changes, plus a set of performance work on top of the TypeScript 7.0 compiler.
Ambient module declarations can now carry import attributes. A project can declare a wildcard module with type css, text or bytes, receive the matching type, and get an error when an import leaves out the required attribute. The team notes these declarations are not shipped in the built-in libraries, so each project adds its own.
The es2026 value is now a stable target and lib option, covering additions such as Math.sumPrecise, Error.isError and the Uint8Array base64 and hex helpers. The esnext lib gains proposed methods including Promise.allKeyed and several Iterator helpers.
TypeScript 7.1 also introduces a programmatic API split into entry points such as typescript/sync, typescript/async and typescript/fs, and a content mapper plugin point that lets tools describe embedded code in files like .vue or .svelte. Content mappers run external code, so tsc needs the --runExternalCode flag and editors need workspace trust.
On the project timings published in the post, the type-check time dropped by between about 13 and 47 percent against TypeScript 7.0, with memory use down by 16 to 50 percent. The post also lists a stricter check for distributive type parameters, which can surface new errors in existing code. Teams can try the beta in a branch and report problems before the final release.
Sources
- Announcing TypeScript 7.1 Betaofficial
Verified Oct 25, 2026 (official source). typescriptdevelopertoolsrelease