Skip to content
Menu

TypeScript 7.1 RC Adds ES2026 Target and Faster Checking

The release candidate makes ES2026 a stable target, brings import attributes to ambient modules and cuts memory use by up to 49%. A stable build should follow in about two weeks.

Błażej Gonczar3 min readPL · EN
An arrow with speed streaks hits the centre of a target labelled ES2026, above the title TypeScript 7.1 RC and the line "Stable ES2026 target · faster checking".

Microsoft released TypeScript 7.1 RC on December 4, 2026. Daniel Rosenwasser announced the release candidate on the TypeScript devblog. It installs with npm install -D typescript@rc. The team says 7.1 is feature-complete. Only critical fixes are planned before the stable release.

ES2026 becomes a stable target

TypeScript 7.1 accepts es2026 as a stable --target and --lib option. The lib now includes Math.sumPrecise(), Iterator.concat(), Error.isError() and Array.fromAsync(). Uint8Array gains base64 and hex helpers. Map and WeakMap get getOrInsert() and getOrInsertComputed().

Import attributes and source imports

Ambient module declarations can now carry import attributes. A project can declare one pattern for all files imported with type: "css", "text" or "bytes". TypeScript then flags imports that lack the needed attribute. It also picks the type from the attributes. The team advises libraries not to ship these declarations. End users should write them in their own projects.

The release also supports source phase imports, written as import source. For WebAssembly, the result is a WebAssembly.Module that can go straight into WebAssembly.instantiate.

New API and content mappers

The compiler API is now split into entry points. They include typescript/sync, typescript/async, typescript/fs and typescript/ast. API, program and snapshot objects must be disposed. Otherwise, memory leaks on the Go side.

Content mappers are a new plugin point inspired by Volar. They let TypeScript check files such as .vue through a virtual view. Mappers are outside code, so tsc needs the --runExternalCode flag. Mappers exist or are in the works for Astro, MDX, Svelte, Vue and more.

Flow diagram: a .vue, .svelte, .mdx or .astro file goes to a content mapper, which is outside code and needs --runExternalCode, then becomes a virtual view that the type checker checks

The RC also adds a --disableDynamicImportExtensionRewriting flag. An experimental wasip1 package runs the compiler in browsers and WASI runtimes.

Faster and leaner

The team tested with the default four checker threads and --noEmit. The RC checks code about 1.2x to 2.2x faster than TypeScript 7. Memory use drops by roughly 27% to 49%. The biggest gain was on the mui-docs codebase. Its check time fell from 19.1 s to 8.77 s. Its memory use fell from 7,043 MiB to 3,580 MiB.

Bar charts for mui-docs: check time falls from 19.1 s in TypeScript 7 to 8.77 s in 7.1 RC, and memory use falls from 7,043 MiB to 3,580 MiB

Behavior changes and next steps

Two changes may affect builds. Distributive conditional types are stricter. Inside each branch, the type parameter now acts as a narrower subtype, so some constraints now fail. DOM types in lib.d.ts were also updated.

The stable release is expected within about two weeks. After that, the team will turn to TypeScript 7.2.

Sources