# What changed in typescript

> 62 changes in typescript 6 to 7 from its official release notes, upgrade guides and advisories: 33 breaking, 5 deprecations, 11 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/typescript/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## typescript 7

### Breaking changes

- The asserts keyword is no longer allowed on imports; use with instead to align with import-attribute syntax. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- allowSyntheticDefaultImports can no longer be set to false. (6.0.2, 7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2), [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- alwaysStrict is assumed to be true and can no longer be set to false. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- baseUrl is no longer supported; paths can instead be made relative to the project root. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- downlevelIteration is no longer supported and now produces a hard error. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- esModuleInterop can no longer be set to false. (6.0.2, 7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2), [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- module now defaults to esnext. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- The amd, umd, systemjs, and none module modes are no longer supported; esnext or preserve are recommended with bundlers or browser-based resolution. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- The classic module-resolution mode is no longer supported; bundler or nodenext are recommended. (6.0.2, 7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2), [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The node and node10 module-resolution modes are no longer supported; nodenext or bundler are recommended. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- noUncheckedSideEffectImports now defaults to true. (6.0.2, 7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2), [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- rootDir now defaults to ./, so projects with inner source directories must set it explicitly to preserve their directory structure. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- stableTypeOrdering now defaults to true and cannot be turned off. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- strict now defaults to true, so projects may receive stricter type-checking without setting it explicitly. (6.0.2, 7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2), [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- target now defaults to the current stable ECMAScript version immediately preceding esnext. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- target: es5 is no longer supported and now produces a hard error. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- types now defaults to [], so projects relying on global declarations must list them explicitly or set it to ["*"]. (6.0.2, 7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2), [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- Allows command-line builds to take file paths when the current directory contains a tsconfig.json file. (6.0.2, 7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2), [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The module keyword can no longer be used in namespace declarations. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)

### New APIs and options

- Controls how many project-reference builders can run in parallel under --build, which can speed up monorepo builds at increased memory cost. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- Controls the number of type-checker workers; increasing it can speed up builds but may increase memory use. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- Disables parallelization throughout the compiler, including parsing and emitting, for debugging or resource-constrained environments. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- A compatibility package provides the TypeScript 6.0 API and a tsc6 executable, allowing TypeScript 6 tooling to run alongside TypeScript 7. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)

### Performance

- The native Go port brings native code speed, shared-memory multithreading, and optimizations that typically yield 8x–12x speedups on full builds. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- Watch mode is rebuilt on a cross-platform file-watcher foundation and provides significant resource improvements. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)

### Behavior and default changes

- libReplacement now defaults to false. (6.0.2, 7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2), [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- JavaScript analysis is reworked to be more consistent with TypeScript files, changing supported JSDoc forms and special handling of JavaScript patterns. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- Nightly builds will resume under the standard typescript package with the next tag, installable through npm. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)

### Tooling

- 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. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- The new language server reduces failing commands by over 80% and server crashes by over 60% compared with TypeScript 6.0. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)

### Fixes and other changes

- 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. (7.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)

## typescript 6

### Breaking changes

- The amd-module directive no longer has any effect. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The asserts keyword in import declarations is deprecated; use with for import attributes instead. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- 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. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The option is deprecated because it only affects ES5 emit; setting it at all now leads to a deprecation error. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- Type-checking function expressions in generic calls, especially generic JSX expressions, can catch more bugs; some calls may need an explicit type argument. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The amd module value is no longer supported. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The none module value is no longer supported. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The systemjs module value is no longer supported. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The umd module value is no longer supported. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The outFile option has been removed; use an external bundler to concatenate output files. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The no-default-lib reference directive is no longer supported; consider using --noLib or --libReplacement instead. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- 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. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The target compiler option now defaults to the most recent supported ECMAScript spec version, currently es2025. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- Running tsc with file arguments in a directory containing tsconfig.json now produces an error because the config will not be loaded. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)

### Deprecations

- Setting alwaysStrict to false is deprecated; TypeScript 6.0 assumes all code is in JavaScript strict mode. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The deprecation of import assertion syntax now also applies to import() calls. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- Using module to declare a namespace is now a hard deprecation; use namespace instead. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The node/node10 resolution strategy is deprecated; migrate to nodenext for Node.js or bundler for bundler and Bun projects. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The es5 target is deprecated, and TypeScript's lowest target is now ES2015; use a newer target or an external compiler for ES5 output. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)

### New APIs and options

- Adds library types for the Map and WeakMap `getOrInsert` method. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- Adds library types for the Map and WeakMap `getOrInsertComputed` method, which computes a default only when the key is absent. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- Adds `es2025` as a library option, providing types for built-in APIs and moving some declarations from `esnext` into `es2025`. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- Adds `RegExp.escape` to the `es2025` library types for escaping special regular expression characters in literal strings. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- TypeScript supports Node.js subpath imports beginning with `#/` when moduleResolution is `nodenext` or `bundler`. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- Adds `es2025` as a target option, providing types for built-in APIs and moving some declarations from `esnext` into `es2025`. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- Adds built-in types for the Temporal API, available with `--target esnext`, `lib: ["esnext"]`, or the more granular `esnext.temporal`. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)

### Behavior and default changes

- The declarations from dom.iterable and dom.asynciterable are now included in dom, so DOM collection iteration works with just lib: ["dom"]. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The module compiler option now defaults to esnext. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- The bundler module resolution setting can now be combined with `--module commonjs`. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- Aligns TypeScript 6.0 type ordering with TypeScript 7.0 to help diagnose migration differences; it can slow type-checking by up to 25%. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
- Functions that do not use this are no longer considered contextually sensitive, allowing them to receive higher priority during type inference. (6.0.2) — [release notes](https://github.com/microsoft/TypeScript/releases/tag/v6.0.2)
