• Node.js
  • Chrome Extensions
  • Manifest V3
  • Backend

TypeScript 7 migration guide for Chrome extensions and Node

TypeScript 7 migration guide for Chrome extensions and Node.js backends: the tsconfig errors we hit, the types fix for chrome, linting on TS 6 and a checklist.

Author
Extenify Team
Published
Reading time
11 min read
Rows of steel combination wrenches of different sizes hanging on a gray-blue workshop wall

A TypeScript 7 migration is mostly a tsconfig migration. TypeScript 7.0, the native compiler written in Go, shipped on July 8, 2026, and the 7.1 beta followed on October 20 with the compiler API that many tools are waiting for. The speedup is real, but the first thing most projects see after npm install -D typescript@7 is a list of errors about options that no longer exist, and in a Chrome extension, a wall of Cannot find name 'chrome'.

We upgraded a small Manifest V3 extension and a Node.js server file from TypeScript 5.9.3 to 7.0.2 in late October 2026 and recorded every error. This guide walks through each one, the fix, the tools that still need TypeScript 6, and a step-by-step checklist for extension and SaaS codebases.

Key takeaways

  • TypeScript 7 removes options that 6.0 deprecated, including baseUrl, moduleResolution: "node" and target: "es5". They are now hard errors, not warnings.
  • The default for types is now an empty list. Extensions lose the global chrome namespace and Node.js code loses process until you add "types": ["chrome"] or "types": ["node"].
  • On our 600-module test project with 4 vCPUs, a full type check went from 4.6 seconds to 0.92 seconds, and memory dropped from about 220 MB to 150 MB.
  • TypeScript 7.0 ships no compiler API. typescript-eslint 8.72.1 still declares a peer range of >=4.8.4 <6.1.0, so keep TypeScript 6 installed for linting.
  • Migrate in two steps: make the project compile cleanly on 6.0, then switch type checking to 7 while tools that need the API stay on 6.

What changes in TypeScript 7

TypeScript 7 is a port of the compiler to Go, published as the normal typescript package with the same tsc command. Microsoft's TypeScript 7.0 announcement reports full-build speedups between 7.7x and 11.9x on large open source projects, for example 125.7 seconds down to 10.6 seconds for VS Code. Type checking runs in parallel, with --checkers (default 4) to set the number of workers and --singleThreaded to turn parallelism off.

The changes that affect a migration fall into three groups:

Change What it means for you
New defaults strict is true, module is esnext, types is [], rootDir is ./ and noUncheckedSideEffectImports is true
Removed options target: "es5", downlevelIteration, moduleResolution: "node"/"node10"/"classic", module: "amd"/"umd"/"systemjs"/"none", baseUrl, and esModuleInterop or allowSyntheticDefaultImports set to false
No compiler API in 7.0 Tools that import typescript as a library (linters, ts-node, framework language tools) need TypeScript 6 until they support the new API

Microsoft also ships @typescript/typescript6, which provides a tsc6 command and the 6.0 API, so both versions can live in one project.

The errors we hit, and how to fix them

Our test project was deliberately ordinary: a Manifest V3 service worker that listens to chrome.runtime.onInstalled, a popup script that reads chrome.storage.local, a shared helper imported through a @/ path alias, and a separate Node.js server file. It used @types/chrome 0.3.7 and @types/node 22, with a tsconfig typical of older extension templates:

{
  "compilerOptions": {
    "target": "es2020",
    "module": "esnext",
    "moduleResolution": "node",
    "lib": ["dom", "es2020"],
    "baseUrl": ".",
    "paths": { "@/*": ["src/*"] },
    "esModuleInterop": true,
    "strict": true,
    "noEmit": true
  },
  "include": ["src"]
}

TypeScript 5.9.3 compiled it with no errors. TypeScript 7.0.2 stopped before checking a single file.

Error 1: removed options in tsconfig

tsconfig.json(5,25): error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration.
tsconfig.json(7,5): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
  Use '"paths": {"*": ["./*"]}' instead.
tsconfig.json(8,24): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?

Note that "node" is reported as node10, its newer name. The fixes:

  • moduleResolution: use "bundler" for code that a bundler builds, which covers most extensions, and "nodenext" for code that Node.js runs directly.
  • baseUrl: delete it. paths entries now resolve relative to the tsconfig file.
  • paths: add a leading ./ to every target, so "@/*": ["src/*"] becomes "@/*": ["./src/*"]. This third error only appears once baseUrl is gone, which is easy to miss.

Error 2: Cannot find name 'chrome'

With the options fixed, TypeScript 7 started checking and reported this for every use of the extension API:

src/background.ts(3,1): error TS2304: Cannot find name 'chrome'.
src/background.ts(3,49): error TS7031: Binding element 'reason' implicitly has an 'any' type.
src/popup.ts(4,33): error TS2304: Cannot find name 'chrome'.

This is the change most likely to confuse extension developers, because @types/chrome is still installed. Before TypeScript 7, every package under node_modules/@types was loaded automatically. Now types defaults to an empty list, and global declarations such as the chrome namespace are only loaded when you list them. The implicit any errors follow from the missing types: without chrome, the listener's parameters have no type. One line fixes all of them:

"types": ["chrome"]

If you use the browser namespace through webextension-polyfill or another types package, list that one too. To restore the old behavior for everything, "types": ["*"] works, but naming what each tsconfig needs is cleaner and keeps Node.js globals out of extension code.

Error 3: Node.js globals disappear on the backend

The same default hits server code. Our Node.js file, checked with a minimal "module": "nodenext" config, compiled on 5.9 and failed on 7:

server/index.ts(1,30): error TS2591: Cannot find name 'node:fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
server/index.ts(2,21): error TS2591: Cannot find name 'process'. Do you need to install type definitions for node? ...

The message says what to do: add "types": ["node"]. Test files need their framework too, for example ["node", "vitest/globals"] if you use Vitest globals.

Error 4: checking a single file

Running tsc src/popup.ts in a folder that has a tsconfig now fails instead of silently ignoring the config:

error TS5112: tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error.

Scripts that check individual files need --ignoreConfig, or better, a small tsconfig of their own.

The speedup on our project

With the errors fixed, we added 600 generated modules that use generics, mapped types and chrome.storage, and ran a full tsc --noEmit three times with each version on a 4 vCPU Linux machine:

Version Total time Check time Memory
TypeScript 5.9.3 4.50 to 4.76 s 3.37 to 3.68 s 213 to 223 MB
TypeScript 7.0.2 0.92 to 0.96 s 0.65 to 0.71 s 151 MB

About 5x faster end to end, which is less than Microsoft's large-project numbers but typical for a small codebase where startup is a bigger share of the total. The gain matters most in CI and in the editor, where every type check now finishes before you look away.

TypeScript 7 migration guide, step by step

  1. Get to 6.0 first. Microsoft's recommended path is to compile cleanly on TypeScript 6.0 with no ignoreDeprecations setting and with stableTypeOrdering turned on. Every option that 7 removes is a deprecation warning in 6, so you fix them with the old compiler still working.
  2. Rewrite the removed options. Remove baseUrl, prefix paths with ./, replace moduleResolution: "node" with "bundler" or "nodenext", and raise any es5 target to at least es2015 (most extensions can use es2022 or later, since Chrome supports it).
  3. Add types to every tsconfig. ["chrome"] for extension code, ["node"] for servers and build scripts, plus your test framework where tests live.
  4. Set rootDir where it matters. The default is now the folder that holds the tsconfig. In a test project with the tsconfig next to src and an outDir, TypeScript 7 reported error TS5011: The common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set... and still wrote out/src/a.js where 5.9 wrote out/a.js. Set "rootDir": "./src" so your output layout does not change.
  5. Install TypeScript 7 for type checking. npm install -D typescript@7 installs the compiler plus a platform-specific binary package as an optional dependency (on our Linux machine, @typescript/typescript-linux-x64). Do not install with optional dependencies omitted, and if CI or Docker builds on a different platform from your laptop, make sure the install there picks up its own binary.
  6. Keep TypeScript 6 for tools that need the API. Microsoft suggests npm aliases, for example "typescript": "npm:@typescript/typescript6@^6.0.2" alongside "@typescript/native": "npm:typescript@^7.0.2", so linters keep importing 6.0 while your type check runs on 7.
  7. Run both checks in CI for a while. A job that runs tsc6 --noEmit and the TypeScript 7 check side by side catches the rare case where the two disagree before you drop 6.
  8. Switch the editor. In VS Code, the TypeScript 7 extension adds commands to enable or disable the TypeScript 7 language server, so you can fall back if something misbehaves.

The working tsconfig for our extension ended up like this, with a separate one for the server:

{
  "compilerOptions": {
    "target": "es2022",
    "module": "esnext",
    "moduleResolution": "bundler",
    "lib": ["dom", "es2022"],
    "types": ["chrome"],
    "paths": { "@/*": ["./src/*"] },
    "strict": true,
    "noEmit": true
  },
  "include": ["src"]
}
{
  "compilerOptions": {
    "module": "nodenext",
    "types": ["node"],
    "strict": true,
    "noEmit": true
  },
  "include": ["server"]
}

Which tools work with TypeScript 7 today

Tool Status in late October 2026 What to do
tsc type checking Works Switch first; this is where the speed is
Vite, esbuild and frameworks built on them, such as WXT Unaffected: they remove types without type checking Keep running tsc --noEmit as a separate step
typescript-eslint Peer range >=4.8.4 <6.1.0 in 8.72.1 Keep TypeScript 6 installed for linting
ts-node and other tools that import the compiler API Need the 6.0 API Stay on 6, or run TypeScript with a tool that does not use the compiler API
Vue, Svelte, Astro and MDX language tools Not supported on 7.0 Stay on 6.0; 7.1 adds the hooks they need
VS Code TypeScript 7 extension Toggle between 6 and 7 with the built-in commands

For most extension projects, the build does not change at all, because the bundler never type checked in the first place. What changes is how fast tsc --noEmit runs in CI and how quickly the editor shows errors.

What TypeScript 7.1 adds

The 7.1 beta, announced on October 20, 2026, fills the main gap in 7.0. It adds a new compiler API with typescript/sync and typescript/async entry points, plus content mappers that let tools register a file extension and hand TypeScript a virtual version of the file to check, which the CLI only runs with --runExternalCode. Microsoft lists prototypes for Astro, CSS Modules, Ember, MDX, Svelte and Vue. It also makes --target es2026 stable and is stricter about some distributive conditional types, so expect a few new errors in type-heavy code.

Microsoft says a release candidate will follow about a month after the beta, with the final release shortly after. If your blockers are linting or Vue and Svelte tooling, plan the full switch after 7.1 is stable and your tools have released support; until then, run type checks on 7 and everything else on 6.

After the upgrade

A compiler upgrade should not change what your extension does, but it can change what ships if tsc emits your JavaScript. Compare the build output before and after, run your end-to-end tests, and keep an eye on the store after the next release:

Extenify handles that last part for you. It is a browser extension analytics dashboard built on public store listing data that tracks users, ratings, reviews and versions for your extensions and apps across the Chrome Web Store, Edge Add-ons, Firefox Add-ons, Google Play and the App Store, and alerts you by email, Slack, Telegram, Discord or Teams when a release moves the numbers. Every plan starts with a 7-day free trial with no credit card required; see pricing.

Frequently asked questions

Is TypeScript 7 stable?

Yes. TypeScript 7.0 was released as stable on July 8, 2026, and 7.0.2 was the latest version on npm in late October 2026. TypeScript 7.1 was in beta, with a release candidate expected about a month after its October 20 beta.

Why does TypeScript 7 say "Cannot find name 'chrome'"?

Because types now defaults to an empty list, so @types/chrome is no longer loaded automatically. Add "types": ["chrome"] to the tsconfig that covers your extension code.

Do I need to upgrade to TypeScript 6 before TypeScript 7?

It is the recommended path. Every option that TypeScript 7 removes is deprecated in 6.0, so getting a clean 6.0 build first lets you fix them with warnings instead of hard errors.

Does typescript-eslint work with TypeScript 7?

Not yet. typescript-eslint 8.72.1 declares support for TypeScript below 6.1.0, because TypeScript 7.0 ships no compiler API. Keep TypeScript 6 installed for linting, using npm aliases or the @typescript/typescript6 package.

How much faster is TypeScript 7?

Microsoft reports 7.7x to 11.9x faster full builds on large projects such as VS Code and Sentry. On our small 600-module test project, a full type check went from about 4.6 seconds to 0.92 seconds.

What replaces baseUrl in TypeScript 7?

Nothing is needed. Remove baseUrl and write every paths target relative to the tsconfig with a leading ./, such as "@/*": ["./src/*"].

Summary

The TypeScript 7 migration is short once you know where it breaks. Fix the removed options (baseUrl, moduleResolution: "node", es5), add a leading ./ to path targets, and list types explicitly: ["chrome"] for extension code and ["node"] for servers, or the compiler will not find the globals you rely on. Get a clean 6.0 build first, switch type checking to 7 for the speed, and keep TypeScript 6 installed for typescript-eslint, ts-node and framework tools until they support the API that arrives with 7.1. In our test, that was enough to turn a 4.6-second type check into one that finished in under a second.

Image credits

Put every store in one dashboard tonight.

Sign in with Google, paste one store link, and your unified view is live in under a minute. Then 7 days of Pro free, no credit card required, and you never touch your app's code.

Start free trial