The TypeScript team released the beta of TypeScript 7.1 on October 20, 2026. The announcement, signed by Daniel Rosenwasser and the TypeScript Team, lists a new programming interface for building tools, a stable ES2026 target, support for newer import syntax and further speed and memory gains over TypeScript 7.0.
Anyone who wants to try it can add the beta to a project with npm:
npm install -D typescript@beta
The new version builds on TypeScript 7.0, released in July 2026. Version 7.0 was a native port of the TypeScript compiler written in the Go language. Its announcement said the port typically delivered speedups of between 8x and 12x on full builds compared with TypeScript 6.
A stable ES2026 target
TypeScript 7.1 accepts es2026 as a stable value for the --target and --lib options. The main change is in the type declarations. Features that have become stable in ECMAScript 2026, the 2026 edition of the JavaScript standard, now have types under es2026 instead of only under esnext. Examples include Math.sumPrecise(), Iterator.concat(), Error.isError(), Array.fromAsync(), the new Map method getOrInsert() and Base64 and hex helpers on Uint8Array.
In a project’s tsconfig.json file, the target is set like this:
{
"compilerOptions": {
"target": "es2026"
}
}
The esnext library also gains types for proposed features that are not yet part of the standard, including Promise.allKeyed, Iterator.zip and Iterator.prototype.chunks.
Import attributes and source imports
Import attributes let an import statement tell a runtime or bundler how to treat a file, as in with { type: "json" }. Developers have often typed such imports with wildcard declarations based on the file extension, such as *.css. TypeScript 7.1 lets them declare types by attribute instead, and it reports an error when a matching import leaves the attribute out:
declare module "*" with { type: "text" } {
const content: string;
export default content;
}
The team says these declarations are not shipped in TypeScript’s built-in libraries. It recommends that libraries leave them out of published packages, so each project can declare them itself. The beta also supports source phase imports, written import source, a proposed ECMAScript feature. For WebAssembly files, a source import returns a WebAssembly.Module object.
A new API and content mappers
TypeScript 7.1 ships a new API for building tools on top of the compiler. It is split into entry points, including typescript/sync, a Promise-based typescript/async, typescript/fs for file systems and typescript/ast for syntax tree types. Objects such as an API instance or a program must be cleaned up when they are no longer needed, either with methods such as dispose() or by declaring them with the newer using keyword. The post explains that otherwise memory leaks on the Go side.
A second addition, content mappers, is aimed at file formats that embed JavaScript or TypeScript, such as Vue’s .vue files. A content mapper is registered for file extensions in tsconfig.json and gives TypeScript a virtual version of the file, with regions that map back to the original. Because content mappers are effectively arbitrary programs, running them from the command line requires the --runExternalCode flag, and VS Code requires workspace trust and content mapper permissions. The team says mappers have been prototyped or built for Astro, CSS Modules, Ember, MDX, Svelte and Vue.
Faster checks, less memory
The team compared the beta with TypeScript 7.0 on five open-source codebases, using the default of four type-checker threads and the --noEmit option. The largest gain came on the mui-docs codebase, where checking time fell from 22.2 seconds to 11.9 seconds, a 1.9x speedup, and memory use fell from 8,093 MiB to 4,079 MiB. On the VS Code codebase, time fell from 21.6 to 17.7 seconds.
The beta also tightens one type-checking rule. In conditional types that distribute over union types, TypeScript 7.1 no longer assumes that the distributed type parameter keeps its relationship with other type parameters. Some existing code may now show a new error, such as “Type ‘B’ does not satisfy the constraint ‘A’.”
Why it matters
For learners, the ES2026 target is the most immediate change. It gives type checking for JavaScript features that have reached the 2026 standard, so practice code can use them without falling back to esnext. Speed matters too. When TypeScript 7.0 launched, the team said faster checks let developers tighten the feedback loop between writing code and seeing errors, and 7.1 continues that work with lower memory use.
This is still a beta. The team says its next focus is speed, stability and feedback on the new features, so the beta suits a practice or side project better than code that other people depend on. The new API and content mappers mostly matter to people who build editors, linters and framework tools, but they shape how TypeScript support works in the tools learners use every day.
What to watch
The team expects a release candidate about a month after the beta, followed by the final release shortly after that. It has also promised more examples of the new API in the near future.


