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-12-05.
23 breaking4 deprecations2 behavior and defaults
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittypescript 78 changes
Breaking changes 7
allowSyntheticDefaultImports can no longer be set to false.
esModuleInterop can no longer be set to false.
The classic module-resolution mode is no longer supported; bundler or nodenext are recommended.
noUncheckedSideEffectImports now defaults to true.
strict now defaults to true, so projects may receive stricter type-checking without setting it explicitly.
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.
Behavior and default changes 1
libReplacement now defaults to false.
typescript 621 changes
Breaking changes 16
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.
Use this flag to ignore tsconfig.json and compile specified files with TypeScript defaults.
The amd module value is no longer supported.
The amd, umd, systemjs, and none module values are 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 default module target is now esnext.
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 4
Setting alwaysStrict to false is deprecated; TypeScript 6.0 assumes all code is in JavaScript strict mode.
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.
Behavior and default changes 1
The module compiler option now defaults to esnext.