Skip to content
Back to Blog

TypeScript 6.0: New Features Every Developer Should Know

AI Transformation Lead
  • TypeScript
  • JavaScript
  • Programming Languages
  • Developer Tools
  • Web Development
  • Type System

TypeScript 6.0 landed on March 23, 2026. The upgrade splits into two jobs that most write-ups blur together. One is reading the feature list. The other is working out which of your tsconfig.json options quietly stopped working underneath you while you read it.

Abstract visualization of TypeScript code transformation and type inference in monochrome

Every 6.0 feature, default and deprecation here traces back to Microsoft's DevBlog announcement and the official release notes Microsoft DevBlog, 2026. An earlier version quoted build-speed, memory and inference figures that appear in neither source, so they are gone. Two tables replace the old charts. The first lists the compiler defaults that changed. The second lists every deprecated option with its replacement.

The migration section near the bottom runs five steps. Step two covers types and rootDir, the two defaults Microsoft flags for up-front adjustment. Step three is where most codebases find the rest of their breakage.

The short answer

Microsoft shipped TypeScript 6.0 on March 23, 2026, as the last release built on the original JavaScript codebase. It bridges TypeScript 5.9 and 7.0, the native Go port that followed in July 2026. The headline changes are new defaults, with strict on, types set to an empty list and rootDir fixed to the tsconfig folder. It also deprecates legacy options such as target: es5, baseUrl and outFile, which TypeScript 7.0 turns into hard errors. New lib types cover Temporal, Map.getOrInsert and RegExp.escape. TypeScript carries over 50 million weekly npm downloads, which explains why a single release moves this much tooling.

Performance Improvements: Faster Compilation

TypeScript 6.0 gets faster through new defaults rather than a new compiler. Microsoft published no overall benchmark for the release.

Leaner types Default: TypeScript 5.9 loaded every package in node_modules/@types. TypeScript 6.0 loads none unless you list them. Microsoft reports that many projects cut build time 20-50% just by setting types appropriately.

Cheaper Defaults: libReplacement now defaults to false, which removes a large number of failed module resolutions on every run. A fixed rootDir also spares the compiler from scanning every file path to infer one.

The Real Speedup Is 7.0: TypeScript 7.0, released in July 2026, moves the compiler to native Go code with shared-memory multithreading. Microsoft calls it 10x faster, and its own table shows the vscode codebase building in 10.6 seconds instead of 125.7 Microsoft DevBlog, 2026. The new --stableTypeOrdering flag in 6.0 matches 7.0's type ordering, at a cost of up to 25% slower checks.

Enhanced Type Inference

TypeScript 6.0 makes two inference changes. The second one aligns it with TypeScript 7.0.

Less Context-Sensitivity on this-less Functions: Method syntax used to infer worse than arrow syntax in generic calls. TypeScript 6.0 treats a method that never uses this like an arrow function, so the second call below now type-checks.

typescript
declare function callIt<T>(obj: { produce: (x: number) => T; consume: (y: T) => void; }): void; // Worked before and still works. callIt({ produce(x: number) { return x * 2; }, consume(y) { return y.toFixed(); }, }); // TypeScript 5.9 reported "'y' is of type 'unknown'". TypeScript 6.0 infers number. callIt({ consume(y) { return y.toFixed(); }, produce(x: number) { return x * 2; }, });

Stricter Generic Calls: Function expressions passed to generic calls, including generic JSX, now get stricter checks. This catches more bugs, though some calls need an explicit type argument.

Stable Type Ordering: Microsoft traces new errors under --stableTypeOrdering to inference differences. Its fix is an explicit type argument or a variable annotation.

New Language Features

TypeScript 6.0 adds types for new JavaScript APIs rather than new syntax. Three features often credited to 6.0 shipped in earlier releases.

Temporal Types: The Temporal date and time proposal reached Stage 4, and TypeScript 6.0 ships its types. Enable them with --target esnext or the esnext lib.

typescript
let tomorrow = Temporal.Now.instant().add({ hours: 24 });

Upsert and Escape: Map and WeakMap gain getOrInsert and getOrInsertComputed in the esnext lib. RegExp.escape lands in the new es2025 target and lib.

Explicit Resource Management: The using declaration shipped in TypeScript 5.2, not 6.0. It provides automatic cleanup for disposable resources, similar to C#'s using statement or Python's context managers.

typescript
using file = await openFile('data.txt'); // file is automatically closed when scope exits

Decorator Metadata: This also arrived in TypeScript 5.2. Decorators share a metadata object that frameworks read through Symbol.metadata for serialization and dependency injection.

Import Attributes: TypeScript 5.3 added the with syntax. TypeScript 6.0 now makes the older assert form an error, so switch any import assertions.

typescript
import data from './data.json' with { type: 'json' };

Developer Experience Enhancements

TypeScript 6.0 makes a handful of day-to-day changes that show up in the terminal and the editor.

bundler With CommonJS: --moduleResolution bundler now works with --module commonjs. Microsoft calls this pairing the most suitable upgrade path for many projects leaving node10.

The --ignoreConfig Flag: Running tsc foo.ts beside a tsconfig.json used to ignore the config silently. It now fails with error TS5112, and --ignoreConfig restores the old behavior on purpose.

Simpler lib Arrays: The dom lib now includes dom.iterable and dom.asynciterable, so "lib": ["dom"] is enough to loop over a NodeList.

Subpath Imports With #/: Under nodenext and bundler resolution, packages can use a bare #/ prefix for internal imports, the way bundler users write @/.

Breaking Changes and Deprecations

Microsoft calls TypeScript 6.0 a significant transition release. It stays API compatible with 5.9, but it changes defaults and deprecates options that TypeScript 7.0 removes.

New Defaults: types now defaults to an empty list and rootDir to the folder holding tsconfig.json. Builds that relied on the old behavior fail with missing-name errors or write to dist/src. Every changed default appears below, with the setting that restores the old one.

OptionNew default in 6.0To keep the old behavior
stricttrueSet "strict": false
moduleesnextSet module explicitly
targetNewest supported ES version, es2025 in 6.0Set target explicitly
types[]List packages, such as ["node"], or use ["*"]
rootDirThe folder holding tsconfig.jsonSet "rootDir": "./src"
noUncheckedSideEffectImportstrueSet it to false
libReplacementfalseSet it to true

Deprecated Options: Legacy options such as target: es5, baseUrl and outFile now raise deprecation errors. The migration table below lists each one with its replacement. Setting "ignoreDeprecations": "6.0" silences them, but TypeScript 7.0 turns them into hard errors.

Older Removals: suppressExcessPropertyErrors and noImplicitUseStrict belong to an earlier wave. TypeScript 5.0 deprecated them, and the 5.5 notes say setting them is an error in 6.0.

Lib Updates: DOM type definitions now track the latest web standards, including adjustments to the Temporal APIs.

Migration Guide: Upgrading to TypeScript 6.0

Upgrading existing projects to TypeScript 6.0 is config work first and code fixes second.

Step 1: Update Dependencies

bash
npm install typescript@^6.0.0 --save-dev # or yarn add typescript@^6.0.0 --dev

Step 2: Review Compiler Options

Set types to the global packages you use, for example ["node", "jest"]. Set rootDir to ./src if your output starts landing in dist/src. Then remove the deprecated options in the table below, plus suppressExcessPropertyErrors and noImplicitUseStrict if present. The experimental ts5to6 tool can adjust baseUrl and rootDir for you.

Step 3: Address New Errors

Run the compiler and fix any new errors. Missing names like process point back to types. Default-import errors point to the esModuleInterop change, so import * as express becomes import express. Errors on names like await or static point to strict mode.

Step 4: Enable New Features

strict is now on by default, so confirm your config states the value you want. Then try the Temporal and getOrInsert types through the esnext lib.

Step 5: Update Tooling

Ensure your IDE, build tools, and linting configurations support TypeScript 6.0. Then clear every deprecation without ignoreDeprecations, because TypeScript 7.0 treats them as hard errors. Microsoft says code that compiles cleanly on 6.0 that way, with --stableTypeOrdering on, should compile the same on 7.0.

Deprecated or an error in 6.0What to do instead
target: es5Target ES2015 or later, or use an external compiler
--downlevelIterationRemove it, since it only affected ES5 output
--moduleResolution node (node10)Use nodenext for Node.js or bundler for bundlers and Bun
--moduleResolution classicUse nodenext or bundler
--module amd, umd, systemjs or noneEmit ECMAScript modules or adopt a bundler
--baseUrlRemove it and prefix each paths entry, such as ./src/app/*
esModuleInterop or allowSyntheticDefaultImports set to falseRemove the setting and fix namespace-style default imports
alwaysStrict set to falseRename identifiers such as await, static or private
outFileMove concatenation to an external bundler
module Foo {} namespacesWrite namespace Foo {}
assert on importsWrite with { type: "json" }
/// <reference no-default-lib="true"/>Use --noLib or --libReplacement
tsc file.ts beside a tsconfig.jsonDrop the file arguments, or pass --ignoreConfig

Ecosystem Impact

TypeScript 6.0's release triggers updates across the JavaScript ecosystem.

Framework Updates: React, Vue, Angular, and Svelte release patches built on new TypeScript features. Framework-specific type definitions become more precise.

Build Tool Support: Vite, Webpack, esbuild, and Rollup update their TypeScript integrations to support new language features and optimize for performance improvements.

Library Maintenance: Popular libraries like lodash, RxJS, and date-fns update their type definitions. Community-maintained @types packages follow suit.

Testing Frameworks: Jest, Vitest, and Playwright enhance their TypeScript support, improving type inference for test matchers and fixtures.

Comparison with Alternative Typed Languages

TypeScript 6.0 strengthens its position against alternatives.

Deno: Deno's native TypeScript support remains compelling for new projects, but Node.js now strips types natively, which narrows the gap.

JSDoc: JavaScript with JSDoc annotations stays viable for teams avoiding build steps.

Flow: Flow's niche shrinks further as TypeScript's ecosystem dominance grows. Most Flow projects have migrated or are planning migrations.

ReScript: ReScript maintains its position for performance-critical applications.

Conclusion

TypeScript 6.0 is a bridge release. New defaults cut wasted work in large projects. Stricter generic checks and a stable type-ordering flag move it toward TypeScript 7.0. New lib types align TypeScript with Temporal and other Stage 4 JavaScript proposals.

For developers, the upgrade is config work with a clear payoff. Fix types and rootDir first, then clear the deprecations. Every deprecation you clear now removes a blocker for TypeScript 7.0's native compiler.

For organizations, TypeScript 6.0 solidifies the language's position as the standard for enterprise JavaScript development. The ecosystem continues to grow, with tooling and library support expanding.

The future of web development remains typed. TypeScript 6.0 is the step that gets your codebase ready for a much faster compiler.


Pooya Golchian is an AI Transformation Lead in Dubai who ships agentic AI into production. Follow him on Twitter @pooyagolchian for more insights on modern web development.

Questions about this piece

Follow-ups readers ask most often about the argument above.

  • Not fully. TypeScript 6.0 keeps the 5.9 API but changes defaults and deprecates old options. Many projects must set `types` or `rootDir` to build cleanly [TypeScript Documentation, 2026](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-6-0.html).

  • Microsoft gives no overall figure for 6.0, only a 20-50% build-time cut in many projects setting `types`. TypeScript 7.0, the native Go port, runs 8-12x faster [Microsoft DevBlog, 2026](https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/).

  • The `using` declaration, added in TypeScript 5.2, enables automatic resource cleanup. When a `using` variable goes out of scope, its `[Symbol.dispose]()` method runs. It suits files, network connections and locks [TC39 Proposal, 2025](https://github.com/tc39/proposal-explicit-resource-management).

  • Yes, for many projects. Set `types` and `rootDir` explicitly, since TypeScript 6.0 changed both defaults. Remove deprecated options such as `baseUrl`, `outFile` and `target: es5`.

  • Vue, MDX, Astro and Svelte tooling already runs on TypeScript 6.0, Microsoft said in July 2026. They stay on it until TypeScript 7.0 ships a stable programmatic API.

  • Yes. The 6.0 package requires Node.js 14.17 or later. Add `node` to `types`, since 6.0 no longer loads every `@types` package. Use `--moduleResolution nodenext` for Node.js code.

  • Decorator metadata gives decorators a shared `metadata` object, readable afterwards on the class through `Symbol.metadata`. Frameworks can use it for debugging, serialization and dependency injection. TypeScript added it in 5.2 [TypeScript 5.2 release notes, 2023](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html).