Announcing TypeScript 6.0 RC

Daniel Rosenwasser · 2026年3月6日

AI 摘要 AI 生成,可能有误

微软宣布了 TypeScript 6.0 的候选发布版(Release Candidate),该版本将是基于当前 JavaScript 代码库构建的最后一个版本,并充当通往 TypeScript 7.0 的桥梁,而 TypeScript 7.0 将基于原生 Go 移植版本。此版本包含多项改进,例如降低了不使用 'this' 的函数的上下文敏感性、支持以 '#/' 开头的子路径导入、允许将 '--moduleResolution bundler' 与 '--module commonjs' 组合使用,以及新增 '--stableTypeOrdering' 标志以使类型排序行为与 TypeScript 7.0 保持一致。这些改动主要是为了简化迁移过程,帮助开发者做好采用 TypeScript 7.0 的准备。

Today we are excited to announce the Release Candidate (RC) of TypeScript 6.0! To get started using the RC, you can get it through npm with the following command:

TypeScript 6.0 is a unique release in that we intend for it to be the last release based on the current JavaScript codebase. As announced last year (with recent updates here), we are working on a new codebase for the TypeScript compiler and language service written in Go that takes advantage of the speed of native code and shared-memory multi-threading. This new codebase will be the foundation of TypeScript 7.0 and beyond. TypeScript 6.0 will be the immediate precursor to that release, and in many ways it will act as the bridge between TypeScript 5.9 and 7.0. As such, most changes in TypeScript 6.0 are meant to help align and prepare for adopting TypeScript 7.0.

With that said, there are some new features and improvements that are not just about alignment. Let’s take a look at some of the highlights of this release, followed by a more detailed look at what’s changing for 7.0 and how to prepare for it.

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 TypeScript Blog

Announcing TypeScript 7.1 Beta

AI 摘要TypeScript 7.1 Beta introduces support for import attributes in ambient module declarations, allowing developers to type imports based on attributes like type: "css" or type: "text" rather than file extensions. It also adds support for source phase imports (useful for WebAssembly), the es2026 target and lib with stabilized ECMAScript declarations, new proposed library methods such as Promise.allKeyed and Iterator.zip. Additionally, TypeScript 7.1 ships a new modular API organized into entry points like typescript/sync and typescript/ast, enabling tools to perform compilation and analysis, with explicit resource disposal required for API and Program instances.

Announcing TypeScript 7.0

AI 摘要TypeScript 7.0 has been announced as a native port of the compiler written in Go, delivering 8x–12x faster builds through native code speed, shared-memory multithreading, and new optimizations. The release has been battle-tested with major companies like Slack, Canva, Vercel, and Microsoft teams, with dramatically improved editor responsiveness and reduced language server crashes, though it lacks an API so it can run side-by-side with TypeScript 6.0 via the new @typescript/typescript6 package. New flags such as --checkers, --builders, and --singleThreaded let developers fine-tune parallelization behavior for their codebases and hardware.

Announcing TypeScript 7.0 RC

AI 摘要Microsoft has announced the Release Candidate of TypeScript 7.0, which was ported from the original TypeScript/JavaScript codebase to Go, delivering roughly 10x faster performance while maintaining full type-checking compatibility with TypeScript 6.0. The RC is installable via npm (typescript@rc) and includes new parallelization controls (--checkers, --builders, --singleThreaded), a rebuilt --watch mode based on a Go port of Parcel's file watcher, and side-by-side compatibility with TypeScript 6.0 through the new @typescript/typescript6 package. Having been tested against a decade's worth of test suites and used by major companies like Google, Figma, and Slack, the release candidate is considered highly stable and ready for production workflows and CI pipelines.

Announcing TypeScript 7.0 Beta

AI 摘要TypeScript 7.0 Beta has been announced, marking a major milestone as the compiler has been ported to Go, making it roughly 10 times faster than TypeScript 6.0 while preserving identical type-checking semantics through a methodical port rather than a rewrite. The beta can be installed via npm as @typescript/native-preview (using the tsgo entry point), runs side-by-side with TypeScript 6.0 via the new @typescript/typescript6 package, and has already been validated in large production codebases at Microsoft and partner companies. The release also introduces configurable parallelization options (--checkers, --builders, --singleThreaded), adopts TypeScript 6.0's new defaults and hard errors for deprecated features, and revamps JavaScript support for more consistent analysis.

Announcing TypeScript 6.0

AI 摘要TypeScript 6.0 has been announced as a bridge release between TypeScript 5.9 and the upcoming TypeScript 7.0, and it will be the last release built on the current JavaScript codebase before the Go-based native port takes over. New features include less context-sensitivity for this-less functions during type inference, support for subpath imports starting with #/, the ability to combine --moduleResolution bundler with --module commonjs, and a new --stableTypeOrdering flag that aligns 6.0's type ordering behavior with 7.0 to ease migration.