TypeScript 7.1 beta ships a modular API for embedded tooling
New typescript/sync, typescript/async, typescript/fs and typescript/ast entry points let tools like Vue and Svelte talk to the compiler directly instead of working around it.
The TypeScript team published the TypeScript 7.1 Beta on 20 October. The headline change is a modular API with four entry points, typescript/sync, typescript/async, typescript/fs and typescript/ast, built around Disposable objects and the using keyword. Tools that embed TypeScript inside other file formats, such as Vue, Svelte, Angular and MDX tooling, can now work with the compiler’s content mappers directly instead of reverse-engineering tsc internals.
The beta also adds import attributes on ambient module declarations, source phase imports for WebAssembly, and a stable --target es2026 with new methods like Math.sumPrecise() and Array.fromAsync().
declare module "*" with { type: "css" } {
const styles: CSSStyleSheet;
export default styles;
}
On the mui-docs codebase, --noEmit type-checking with four type-checker threads dropped from 22.2 seconds to 11.9 seconds, and memory usage fell from 8,093 MiB to 4,079 MiB. Install it with npm install -D typescript@beta.
Why it matters: framework tooling that embeds TypeScript has spent years working around the compiler rather than with it. A supported API for content mappers means Vue, Svelte and Astro’s language servers are less likely to drift from upstream TypeScript behaviour, on top of a real drop in CI type-checking time for anyone on a large codebase.
The caveat: this is a beta, so the API surface can still change before a stable release.