Urgent.News

What's breaking now, across thousands of outlets.

Tech

Your tsconfig Is Still Written for TypeScript 5. Here's the Cleanup TS 7 Forces

Most tsconfig.json files are archaeology. Somebody copied one from a starter repo in 2021, somebody else added baseUrl so the @/ imports would work, and a third person set moduleResolution: "node" because a Stack Overflow answer said so. Nobody has touched it since, because it worked. That stops being true this year. TypeScript 6.0 (March 2026) was a deliberate bridge release: it changed a batch…

The TypeScript configuration file (tsconfig.json) has become outdated for TypeScript 7.0. In the past, tsconfig.json files were often inherited from starter repositories without much modification, leading to confusion and potential issues as new versions of TypeScript are released. TypeScript 6.0 in March 2026 introduced significant changes to defaults and deprecated several legacy options. TypeScript 7.0, released in July 2026, kept the new defaults but removed the deprecated options entirely.

The two most confusing error messages developers encountered when upgrading to TypeScript 7.0 were related to the 'types' and 'rootDir' compiler options. TypeScript now defaults to an empty 'types' array, meaning it no longer automatically loads every package under node_modules/@types into the global scope. This change can lead to a flood of "Cannot find name" errors for commonly used global variables like 'process' and 'describe'.

Similarly, 'rootDir' now defaults to the directory containing the tsconfig.json file, causing potential issues if the output directory was previously inferred from the source files' common ancestor.

Other notable changes include the increased strictness defaults, where 'strict' is now enabled by default, and 'module' and 'target' options have been updated to use the newest supported ECMAScript specification. Additionally, 'noUncheckedSideEffectImports' is now enabled, causing errors for typos in import statements. Several deprecated options, such as 'baseUrl' and 'baseUrl' in 'paths', have been removed in TypeScript 7.0.

To successfully migrate to TypeScript 7.0, developers should first run their current configuration with deprecation warnings visible, remove any ignoreDeprecations settings, and treat each warning as a task. Tools like the ts5to6 codemod can help automate the process of updating baseUrl and rootDir settings across a monorepo. Once the majority of the configuration is updated, upgrading to TypeScript 7.0 should be a smooth process.

By explicitly defining types, rootDir, and matching the moduleResolution to the real runtime environment, developers can ensure their tsconfig.json accurately represents their project's configuration.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

About me !

Hey everyone! 👋 I’m Adarsh, a CSE student from India. I’m currently focused on backend development, Python, DSA, and open source.

✨ Meet Swingly — a tiny character that lives on your webpage and swings gently.

I built Swingly, a tiny, playful npm package that brings a little personality to the corner of your website. 🧿 Maybe it’s your evil-eye protector. 🪄 Maybe it’s a tiny charm.

  • Swingly is a tiny npm package adding personality to websites.
  • Offers various characters like evil-eye, charm, or whimsical creatures.
  • Open to community contributions for unique characters and interactions.

One request a second for the whole app, so our place search has no search-as-you-type

Setting up a business campaign in Nakodo means saying where to look. You type a town, a city, a region or a country, press Add, choose which match you meant, and pick a distance.

  • Upstash's Ratelimit library used for rate limiting, allowing one request per second globally.
  • Caching results for 30 days as location data is unlikely to change within that timeframe.

More from Sunday 4 October →