Will your tsconfig.json work in TypeScript 7?
TypeScript 7.0 removed the options 6.0 deprecated, and 6.0 changed defaults such as strict, types and rootDir. Paste your tsconfig to see what tsc 7 will reject, which default changes reach your project, and a suggested config. Every rule here was confirmed by running tsc 5.9.3, 6.0.3 and 7.0.2. It runs in your browser; nothing is uploaded.
Check a tsconfig
What it checks
| Setting | TypeScript 6.0 | TypeScript 7.0 |
|---|---|---|
"target": "es5", downlevelIteration, baseUrl, outFile, "moduleResolution": "node" / "node10" / "classic", "module": "amd" / "umd" / "system", esModuleInterop, allowSyntheticDefaultImports or alwaysStrict set to false | error TS5101 / TS5107 (deprecated; "ignoreDeprecations": "6.0" silences it) | error TS5102 / TS5108 (removed) |
"module": "none" | error TS5107 | error TS6046 (not a valid value) |
charset, out, keyofStringsOnly, noImplicitUseStrict, suppressExcessPropertyErrors, suppressImplicitAnyIndexErrors, noStrictGenericChecks, importsNotUsedAsValues, preserveValueImports (removed in 5.5) | error TS5102 when switched on | error TS5023 (unknown option), whatever the value |
"target": "es3" | error TS5108 | error TS6046 |
"prepend": true on a project reference | error TS5102 | silently ignored |
Left out: strict, types, target, module, moduleResolution, esModuleInterop, rootDir, noUncheckedSideEffectImports | New defaults since 6.0: strict on, types empty, target ES2025, module from the target, bundler resolution, interop on, rootDir at the tsconfig folder, unresolved side-effect imports are errors | |
Checked against 61 real and hand-written configs, including 35 versions of the 25 @tsconfig/bases packages (the current release of each, plus older majors): the checker named exactly the options tsc 7.0.2 rejected in every one, and every suggested config compiled with no config errors under tsc 6.0.3 and 7.0.2. The method and data are in the eval folder.
The same check in CI
The CLI needs Node.js 20 or later and nothing else. It follows relative and node_modules extends, names the @types packages the new types default stops loading, and exits 1 when TypeScript 7 would reject the config (add --strict to fail on warnings too).
node cli.mjs # ./tsconfig.json node cli.mjs packages/*/tsconfig.json --strict node cli.mjs tsconfig.json --suggest # print a fixed compilerOptions node cli.mjs tsconfig.json --json
Source and README: ventures/tsconfig-ts7-check.
Questions
Which tsconfig options did TypeScript 7 remove?
TypeScript 6.0 deprecated, and 7.0 removed: target ES5, downlevelIteration, moduleResolution node (node10) and classic, baseUrl, outFile, module AMD, UMD, System and None, and the false values of esModuleInterop, allowSyntheticDefaultImports and alwaysStrict. TypeScript 7 stops with error TS5102 or TS5108 for most of them and TS6046 for module None. The options removed back in 5.5 (charset, out, keyofStringsOnly, importsNotUsedAsValues and others) are unknown options in 7, error TS5023, even when set to false.
How do I replace baseUrl in TypeScript 7?
Delete baseUrl and write every paths target relative to the tsconfig file. With baseUrl set to src and "@lib/*": ["lib/*"], write "@lib/*": ["./src/lib/*"]. Imports that only worked because baseUrl made src a lookup root, such as import "utils/date" meaning ./src/utils/date, need a paths entry like "*": ["./src/*"] or a relative import. The suggested config on this page does the paths rewrite for you.
Does "ignoreDeprecations": "6.0" work in TypeScript 7?
No. In TypeScript 6 it silences the TS5101 and TS5107 deprecation errors. TypeScript 7 still accepts the setting but reports every removed option as an error regardless, so it only buys time on 6.0. Fix the options, then delete it.
Why are process, Buffer or describe undefined after upgrading to TypeScript 6 or 7?
Because the default of types changed from loading every package in node_modules/@types to an empty list. Globals that came from @types/node, @types/jest or @types/mocha are no longer declared unless you list them, for example "types": ["node", "jest"]. "types": ["*"] restores the old load-everything behaviour.
If this check finds nothing, will my project compile with TypeScript 7?
Not necessarily. The check covers the config file: removed options and changed defaults. Your code can still hit new type errors, packages may resolve differently under bundler or nodenext resolution, and editor plugins listed in plugins are a separate question. Run tsc 7 on the project; this page tells you why the first errors appear and what to change in the config.