Best Tools · Coding
TypeScript 7.1 beta
SummaryThe Go-based TypeScript compiler gets a stable programmatic API and finally catches imports that forget their import attribute.
Filed October 25, 2026. Price, as published by the maker: Free, open source (Apache-2.0). Install with npm install -D typescript@beta. No account..
Open the maker’s site (opens in a new tab)
TypeScript 7.1 is the first feature release of the native, Go-based TypeScript compiler after 7.0. Microsoft shipped the beta on October 20, 2026. The two changes builders will feel are a new programmatic API for tools (typescript/sync, typescript/async, typescript/fs, typescript/ast) and type rules for imports that use import attributes, such as with { type: "text" }.
How we tested. October 25, 2026, on an 8-core Linux box with Node 20. We type-checked our own Next.js site with TypeScript 5.9.3, 7.0.2 and 7.1.0-beta, five runs each, then wrote small test projects for the new import-attribute declarations and ran the blog's own API example. The full test is in the story.
Pro: A .md import that forgot with { type: "text" } passed silently on 5.9.3, 7.0.2 and 7.1 with the old declare module "*.md" pattern. With 7.1's new declare module "*" with { type: "text" }, the same import fails with TS2307, and the correct one is typed as a string. On our site, 7.1 used about 105 MB versus 153 MB on 7.0.2 (same speed, about 0.4 seconds), with zero errors on every version.
Con: It's a beta. The API moved: 7.0.2 shipped it under typescript/unstable/*, and 7.1 removes those paths, so code importing them fails with ERR_PACKAGE_PATH_NOT_EXPORTED. The new attribute declarations aren't built in; you write them yourself, and imports aren't checked against files on disk.