Oct 26, 2026

TypeScript 7.1 Beta adds import attributes in ambient modules and an es2026 target

The beta also brings source phase imports for WebAssembly and new proposed library methods under esnext.

The TypeScript team has released the beta of TypeScript 7.1, installable with npm install -D typescript@beta. A headline change is support for import attributes in ambient module declarations, so a declaration such as declare module with a type of css, text or bytes can describe the shape of files only when the matching attribute is present.

Source phase imports, a proposed ECMAScript feature, are also supported through the import source syntax and import.source. They are most useful today for WebAssembly modules passed to WebAssembly.instantiate. Using them requires a module setting such as esnext, nodenext or preserve, plus an appropriate esnext lib or target.

TypeScript 7.1 now treats es2026 as a stable target and lib option. It covers additions such as Math.sumPrecise, Error.isError, Array.fromAsync and Uint8Array base64 and hex helpers. The esnext lib gains proposed methods including Promise.allKeyed, Iterator.zip and Iterator.prototype.chunks.

Because this is a beta, teams should try it on a branch or in CI first. The post advises libraries not to ship wildcard attribute declarations in published packages, leaving those choices to each application.

Sources

Verified Oct 26, 2026 (official source). typescriptjavascriptbeta