TypeScript release

TypeScript 6.0 for JavaScript users

  • Released 23 March 2026
  • From the release notes

TypeScript 6.0 was announced on 23 March 2026. It is the last release built on TypeScript's original codebase and the step before 7.0, the native port: it changes several defaults to what most projects set anyway, and deprecates options that 7.0 removes. A deprecated option is an error unless the config says "ignoreDeprecations": "6.0".

For a JavaScript project the defaults matter most. A jsconfig.json that does not set strict or types checks differently under 6.0. This site's pages describe 5.9, and every example on them also runs under 6.0.3 each time the site is built; this page reports the release notes, with what those runs show.

At a glance

ReleaseTypeScript 6.0
Released23 March 2026, the day of its announcement on the TypeScript blog
SourceTypeScript 6.0 release notes
ExamplesThe snippets on this page follow the release notes and are not checked. Every example elsewhere on this site runs under TypeScript 6.0.3 as well as 5.9.3 when the site is built; the results are counted below.
Previous releaseTypeScript 5.9
Next releaseTypeScript 7.0

What changed for JavaScript

New defaults

Per the release notes: strict is on, types is [] (no @types package is loaded unless listed), module is esnext, target is the newest ECMAScript year (es2025), noUncheckedSideEffectImports is on, libReplacement is off, and rootDir is the folder of the config. Each of those config pages has a "Default from TypeScript 6.0" row.

The notes do not mention jsconfig.json. In a one-off run on 20 October 2026, a jsconfig.json with only checkJs reported an untyped parameter (TS7006) and a missing global from an @types package (TS2304) under 6.0.3, where 5.9 reported neither; --showConfig still listed the defaults a file named jsconfig.json gets (allowJs, maxNodeModuleJsDepth: 2, skipLibCheck, noEmit and allowSyntheticDefaultImports). Setting the options you rely on keeps a config the same across versions:

jsconfig.json
{
  "compilerOptions": {
    "checkJs": true,
    "strict": true,
    "module": "nodenext",
    // list the globals you use; 6.0 loads none by default
    "types": ["node"]
  },
  "include": ["src"]
}

Deprecated options

These now report a deprecation error and are removed in 7.0: target: es5, downlevelIteration, moduleResolution: node (also called node10) and classic, module set to amd, umd, system or none, baseUrl, esModuleInterop or allowSyntheticDefaultImports set to false, alwaysStrict: false, outFile, assert on imports, and the no-default-lib reference directive. TypeScript 6.0.3 reports them as TS5101 for an option and TS5107 for a value, such as allowSyntheticDefaultImports: false on the esModuleInterop page.

Two are common in JavaScript projects. Older jsconfig.json files often set baseUrl so that paths work; under 6.0, baseUrl is not a lookup root, so write the folder into each path instead. And moduleResolution: node should become nodenext for code Node.js runs directly, or bundler for bundled code.

jsconfig.json
{
  "compilerOptions": {
    // before: "baseUrl": ".", "paths": { "@app/*": ["src/*"] }
    "paths": { "@app/*": ["./src/*"] }
  }
}

Files on the command line beside a tsconfig.json

Running tsc src/main.js in a folder with a tsconfig.json is now an error (TS5112), because the config would be ignored without a word; --ignoreConfig makes the choice explicit. The notes name tsconfig.json only, and in the one-off run 6.0.3 did not report TS5112 in a folder that had only a jsconfig.json. Running tsc -p jsconfig.json is unaffected.

Lib changes

"lib": ["dom"] now includes what dom.iterable and dom.asynciterable used to add, so for (const el of document.querySelectorAll("li")) needs no second entry. The new es2025 target and lib add RegExp.escape and move Promise.try, the iterator helpers and the new Set methods out of esnext. esnext gains the types for Temporal and for Map and WeakMap's getOrInsert and getOrInsertComputed.

Subpath imports that start with #/

Node.js allows #/ as the prefix of a subpath import, and 6.0 resolves it under moduleResolution: nodenext and bundler. The imports field of package.json is Node.js's own alternative to paths, so it needs no jsconfig.json setting at all.

package.json
{
  "type": "module",
  "imports": {
    "#/*": "./src/*"
  }
}

Inference for methods that do not use this

An object literal with methods, passed to a generic function, used to infer differently depending on whether a callback was written as a method or an arrow function and on the order of the properties. A method that never uses this is now treated like an arrow function, so the order no longer matters. JavaScript code that passes option objects with methods to typed libraries benefits.

stableTypeOrdering

A new flag orders union members and properties the way 7.0 does, which can change the order in written .d.ts files and, rarely, which errors appear. The notes describe it as a migration aid that can slow checking by up to about 25 percent, not a setting to keep on.

This site's examples under 6.0

This site runs every one of its 750 example projects under TypeScript 6.0.3 when it is built (last on 21 October 2026), and compares each with 5.9.3. 737 report exactly what 5.9.3 reports; 13 differ, for these reasons (an example can have two):

The full list of differences explains each class and links the pages that show its examples.

What did not change

The release notes have no section on JSDoc or JavaScript files: the JSDoc changes come with 7.0. 6.0 keeps 5.9's API, so editors and tools that use TypeScript as a library keep working. In this site's runs, each example that reports something different under 6.0.3 sets, or leaves out, an option whose default changed or that 6.0 deprecates, apart from one: an unresolved side-effect import is now TS2882 rather than TS2307. The section below counts them.

Upgrade notes

Per the release notes, most projects need one or two of these:

  • Set types to the global packages you use (["node"], plus a test runner's types); ["*"] restores loading every @types package.
  • Set strict explicitly if your project does not want it.
  • Set rootDir if your output used to land beside an inferred source root.
  • Replace baseUrl and moduleResolution: node before 7.0 removes them; "ignoreDeprecations": "6.0" buys time, not a fix.
  • Replace assert { type: "json" } with with { type: "json" }.

Gotchas

  • ignoreDeprecations takes the version whose deprecations you are silencing: "6.0" here, as "5.0" was for the 5.0 deprecations.

Sources

Last reviewed 21 October 2026.