npm install -D typescript@beta. TypeScript 7.0 brought the Go-based native compiler. Version 7.1 adds the programmatic API that 7.0 lacked, plus a few language and library changes.
Why this beta matters
TypeScript 7.0 shipped without an API, and a new, different one was expected in 7.1. That gap kept some tools on older TypeScript. One independent write-up describes editors, ESLint and framework tooling still running on TypeScript 6 even though CI got faster. That is a third-party view, not Microsoft's.
If you only run tsc, the headline items are the speed and memory gains, the new es2026 target, and one stricter type check. If you build tools, the new API and content mappers are the main story.
Release timing
The announcement says a Release Candidate should arrive in about a month, with a final release shortly after. The team's public iteration plan on GitHub is more specific. It lists a beta on 2026-10-06, an RC on 2026-11-10 and a stable release on 2026-11-24. The blog post itself is dated October 20, so the beta reached the blog later than that plan. Treat the November dates as planning targets, not promises.
Import attributes in ambient modules
Import attributes are the with { type: "json" } part of an import statement. They tell a runtime or bundler how to interpret a file. Browsers and runtimes already use type: "json" and type: "css". Proposals cover type: "text" (a string) and type: "bytes" (a Uint8Array).
Until now, TypeScript users typed these files with wildcard declarations like declare module "*.css". That approach keys on file extension. It ignores attributes, so it can't flag an import that left the attribute off. It also forces you to repeat a pattern for every extension that uses the same attribute.
TypeScript 7.1 lets an ambient declaration match on the attribute:
declare module "*" with { type: "css" } {
const content: CSSStyleSheet;
export default content;
}
declare module "*" with { type: "text" } {
const content: string;
export default content;
}
declare module "*" with { type: "bytes" } {
const content: Uint8Array;
export default content;
}
You get an error if the required attribute is missing, and the import gets the type that matches its attribute. That matters because bundlers may treat a bare .css import as CSS Modules, while type: "css" asks for a browser-style CSSStyleSheet.
Caveats from the announcement:
- Imports that match these declarations are not checked against files on disk. A missing file shows up at runtime or in the bundler build.
- These declarations are not part of TypeScript's built-in libraries.
- Libraries should not ship them in published packages. Applications should declare them in their own projects. That leaves each project free to choose its global setup, such as
lib.dom.d.tsversus@types/node, and avoids future conflicts.
References
- Announcing TypeScript 7.1 Beta TypeScript Blog · 2026-10-20T17:53:06+00:00
- TypeScript 7.1 Iteration Plan · Issue #63703 · microsoft/TypeScript · GitHub github.com
- TypeScript 7.1 Beta: The Release That Will Allow Your Tools To Catch Up medium.com