npm / typescript
typescript
What changed in typescript 6 to 7, from its official release notes, upgrade guides and advisories. Also covers @typescript/typescript6. Sources checked 2026-10-18.
33 breaking5 deprecations11 new APIs and options2 performance8 behavior and defaults2 tooling1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittypescript 731 changes
Breaking changes 19
The asserts keyword is no longer allowed on imports; use with instead to align with import-attribute syntax.
allowSyntheticDefaultImports can no longer be set to false.
alwaysStrict is assumed to be true and can no longer be set to false.
baseUrl is no longer supported; paths can instead be made relative to the project root.
downlevelIteration is no longer supported and now produces a hard error.
esModuleInterop can no longer be set to false.
module now defaults to esnext.
The amd, umd, systemjs, and none module modes are no longer supported; esnext or preserve are recommended with bundlers or browser-based resolution.
The classic module-resolution mode is no longer supported; bundler or nodenext are recommended.
The node and node10 module-resolution modes are no longer supported; nodenext or bundler are recommended.
noUncheckedSideEffectImports now defaults to true.
rootDir now defaults to ./, so projects with inner source directories must set it explicitly to preserve their directory structure.
stableTypeOrdering now defaults to true and cannot be turned off.
strict now defaults to true, so projects may receive stricter type-checking without setting it explicitly.
target now defaults to the current stable ECMAScript version immediately preceding esnext.
target: es5 is no longer supported and now produces a hard error.
types now defaults to [], so projects relying on global declarations must list them explicitly or set it to ["*"].
Allows command-line builds to take file paths when the current directory contains a tsconfig.json file.
The module keyword can no longer be used in namespace declarations.
New APIs and options 4
Controls how many project-reference builders can run in parallel under --build, which can speed up monorepo builds at increased memory cost.
Controls the number of type-checker workers; increasing it can speed up builds but may increase memory use.
Disables parallelization throughout the compiler, including parsing and emitting, for debugging or resource-constrained environments.
A compatibility package provides the TypeScript 6.0 API and a tsc6 executable, allowing TypeScript 6 tooling to run alongside TypeScript 7.
Performance 2
The native Go port brings native code speed, shared-memory multithreading, and optimizations that typically yield 8x–12x speedups on full builds.
Watch mode is rebuilt on a cross-platform file-watcher foundation and provides significant resource improvements.
Behavior and default changes 3
libReplacement now defaults to false.
JavaScript analysis is reworked to be more consistent with TypeScript files, changing supported JSDoc forms and special handling of JavaScript patterns.
Nightly builds will resume under the standard typescript package with the next tag, installable through npm.
Tooling 2
The language server adds auto-imports, expandable hovers, inlay hints, code lenses, go-to-source-definition, JSX linked editing and tag completions, semantic highlighting, and import-management features.
The new language server reduces failing commands by over 80% and server crashes by over 60% compared with TypeScript 6.0.
Fixes and other changes 1
Inference now treats Unicode code points as single units, so a leading emoji is inferred as one character rather than two UTF-16 surrogate halves.
typescript 631 changes
Breaking changes 14
The amd-module directive no longer has any effect.
The asserts keyword in import declarations is deprecated; use with for import attributes instead.
baseUrl is deprecated and is no longer a module-resolution lookup root; move prefixes into paths entries or add an explicit catch-all path mapping if needed.
The option is deprecated because it only affects ES5 emit; setting it at all now leads to a deprecation error.
Type-checking function expressions in generic calls, especially generic JSX expressions, can catch more bugs; some calls may need an explicit type argument.
The amd module value is no longer supported.
The none module value is no longer supported.
The systemjs module value is no longer supported.
The umd module value is no longer supported.
The outFile option has been removed; use an external bundler to concatenate output files.
The no-default-lib reference directive is no longer supported; consider using --noLib or --libReplacement instead.
With a tsconfig.json, rootDir now defaults to the directory containing that file; without one, it is still inferred when invoking tsc from the command line.
The target compiler option now defaults to the most recent supported ECMAScript spec version, currently es2025.
Running tsc with file arguments in a directory containing tsconfig.json now produces an error because the config will not be loaded.
Deprecations 5
Setting alwaysStrict to false is deprecated; TypeScript 6.0 assumes all code is in JavaScript strict mode.
The deprecation of import assertion syntax now also applies to import() calls.
Using module to declare a namespace is now a hard deprecation; use namespace instead.
The node/node10 resolution strategy is deprecated; migrate to nodenext for Node.js or bundler for bundler and Bun projects.
The es5 target is deprecated, and TypeScript's lowest target is now ES2015; use a newer target or an external compiler for ES5 output.
New APIs and options 7
Adds library types for the Map and WeakMap
getOrInsertmethod.Adds library types for the Map and WeakMap
getOrInsertComputedmethod, which computes a default only when the key is absent.Adds
es2025as a library option, providing types for built-in APIs and moving some declarations fromesnextintoes2025.Adds
RegExp.escapeto thees2025library types for escaping special regular expression characters in literal strings.TypeScript supports Node.js subpath imports beginning with
#/when moduleResolution isnodenextorbundler.Adds
es2025as a target option, providing types for built-in APIs and moving some declarations fromesnextintoes2025.Adds built-in types for the Temporal API, available with
--target esnext,lib: ["esnext"], or the more granularesnext.temporal.
Behavior and default changes 5
The declarations from dom.iterable and dom.asynciterable are now included in dom, so DOM collection iteration works with just lib: ["dom"].
The module compiler option now defaults to esnext.
The bundler module resolution setting can now be combined with
--module commonjs.Aligns TypeScript 6.0 type ordering with TypeScript 7.0 to help diagnose migration differences; it can slow type-checking by up to 25%.
Functions that do not use this are no longer considered contextually sensitive, allowing them to receive higher priority during type inference.