News

TypeScript 6.0 Ships as Final JavaScript-Based Release, Clears Path for Go-Native 7.0

Microsoft on March 23 released TypeScript 6.0, the final major version built on the project's original JavaScript compiler codebase. The release functions as a transition milestone, introducing deprecations, default-value changes, and a new migration flag that collectively prepare developers for TypeScript 7.0 -- the upcoming reimplementation of the compiler and language service in the Go programming language.

TypeScript 6.0 is available on npm. Daniel Rosenwasser, principal product manager for the TypeScript team, in a post on the TypeScript Dev Blog, said, "TypeScript 6.0 is a unique release in that we intend for it to be the last release based on the current JavaScript codebase."

What Changed After the Release Candidate
The TypeScript 6.0 release candidate shipped on March 6 (see "TypeScript 6.0 RC Bridges to Go-Based Future"). Between that RC and the general availability build, the team made three targeted adjustments, characterized in the announcement as being "mostly to align with the behavior of TypeScript 7.0."

The first is a type-checking adjustment for function expressions in generic calls, particularly those occurring in generic JSX expressions. The team notes this "will typically catch more bugs in existing code, though you may find that some generic calls may need an explicit type argument."

The second extends the existing deprecation of import assertion syntax -- the assert keyword on static imports -- to dynamic import() calls as well. The third is an update to the DOM types reflecting current web standards, including adjustments to the Temporal APIs.

The Bridge to a Go-Based TypeScript 7.0
The central narrative of TypeScript 6.0 is its role as a bridge release. "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," the announcement states. "That new codebase will be the foundation of TypeScript 7.0 and beyond."

As previously reported in Visual Studio Magazine, the effort -- previously codenamed "Project Corsa" -- aims to deliver major gains in compiler speed, memory usage, and scalability by moving from the current JavaScript implementation to native Go code with shared-memory multi-threading.

Microsoft indicates the native port is further along than many developers may realize. "It may seem surprising to say, but TypeScript 7.0 is actually extremely close to completion," the post states. Nightly builds are available both as a VS Code extension and as an npm package (@typescript/native-preview). The team says it expects "a release within a few months" and is "already seeing broad adoption inside and outside of Microsoft on extremely large codebases."

New Flag for Migration: --stableTypeOrdering
One of the most migration-relevant additions in TypeScript 6.0 is the new --stableTypeOrdering compiler flag, introduced specifically to help developers compare output between the current compiler and the Go-based one.

Today, TypeScript assigns internal type IDs in the order types are encountered, and uses those IDs to sort union types. Because TypeScript 7.0 introduces parallel type checking -- where different checkers visit nodes in different orders -- the native port uses a deterministic sorting algorithm based on content rather than encounter order. This means the two compilers can produce different union orderings in declaration emit. The --stableTypeOrdering flag makes 6.0's ordering match 7.0's behavior, reducing noise when comparing output between the two.

The team cautions that the flag "can add a substantial slowdown to type-checking (up to 25% depending on codebase)" and is "only intended to help diagnose differences between 6.0 and 7.0," not as a permanent setting.

Deprecations Pave the Way for 7.0
TypeScript 6.0 carries an extensive list of deprecations and default-value changes, all of which will become hard removals in TypeScript 7.0. In 6.0, projects can suppress deprecation errors by setting "ignoreDeprecations": "6.0" in their tsconfig, but the announcement notes that "TypeScript 7.0 will not support any of these deprecated options."

Among the deprecated options: target: es5, --downlevelIteration, --moduleResolution node (a.k.a. node10), --moduleResolution classic, the amd, umd, and systemjs values of module, --baseUrl, --outFile, --esModuleInterop false, --allowSyntheticDefaultImports false, --alwaysStrict false, the legacy module syntax for namespaces, the asserts keyword on imports, and no-default-lib directives.

Several compiler defaults have also been updated. strict is now true by default. The module option defaults to esnext. The target defaults to the most recent supported ECMAScript spec (currently es2025). The types array now defaults to [] (empty) rather than enumerating all packages in node_modules/@types. And rootDir now defaults to . (the directory containing the tsconfig.json file) rather than being inferred.

Microsoft notes that the types default change in particular has had measurable impact: "Many projects we've looked at have improved their build time anywhere from 20-50% just by setting types appropriately."

For migration assistance, the team points to the experimental ts5to6 tool, which can automatically adjust baseUrl and rootDir settings across a codebase.

New Features Beyond Migration
While the release's primary purpose is transition preparation, TypeScript 6.0 does include standalone features. The release adds less context-sensitivity on this-less functions, resolving a long-standing inconsistency between arrow functions and method syntax in generic inference. Support for subpath imports starting with #/ -- a recently added Node.js capability -- is now available under nodenext and bundler module resolution. The release also allows combining --moduleResolution bundler with --module commonjs, providing a migration path away from the now-deprecated --moduleResolution node.

On the standards side, TypeScript 6.0 adds the es2025 option for target and lib, built-in types for the stage-4 Temporal API (via esnext.temporal), types for the getOrInsert and getOrInsertComputed Map methods from the stage-4 "upsert" proposal, and RegExp.escape from the stage-4 regex escaping proposal. The dom lib now includes the contents of dom.iterable and dom.asynciterable, eliminating the need to list them separately.

What's Next
With TypeScript 6.0 now available, the team says its primary focus shifts to bringing TypeScript 7.0 to stability. "We encourage teams to try out nightly builds of TypeScript 7.0's native previews on npm along with the VS Code extension too," the announcement states. "Feedback on TypeScript 7.0 will go a long way, and you can file issues on our issue tracker."

Developers can install TypeScript 6.0 via npm install -D typescript.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • VS Code 1.123 Adds Agent Session Sync, 1M Context Windows

    Microsoft released Visual Studio Code 1.123 on June 3, adding agent-focused features, larger model context support, integrated browser updates and a new delay for some automatic extension updates.

  • Copilot Billing Shock Hits Developers

    Developer complaints about GitHub Copilot's new usage-based billing model have centered on unexpectedly rapid AI credit consumption, and neither GitHub nor Microsoft has responded directly to the backlash, though they have previously published guidance to lessen model usage costs.

  • Hands On with GitHub Copilot App Technical Preview: Turning a Blazor Issue into a PR

    GitHub's brand-new Copilot desktop app, in technical preview, handled a small Blazor issue from planning through pull request creation, but the hands-on test also showed why developers still need to verify agent work in the running app before merging.

  • At Build 2026, Microsoft Sets Up Windows as an OS for AI Agents

    Microsoft's Build 2026 Windows developer announcements point to a broader platform strategy for agentic AI, spanning terminal workflows, local models, app-building skills, Cloud PCs and operating system-level containment.

Subscribe on YouTube