jsconfig.json key

extends

  • Default not set
  • Since TypeScript 2.1

extends names a config file to start from. Its compilerOptions come first and yours override them one option at a time; files, include and exclude are replaced as a whole when you set them. Relative paths in each file, such as paths entries, are resolved relative to the file they are written in.

It arrived with TypeScript 2.1. Since 3.2 the name can be a package in node_modules, and since 5.0 it can be a list, where later files win.

At a glance

Write "./jsconfig.base.json" when several configs share options: one per package in a monorepo, or one for publishing types
On the command line No flag: only a config file can set it
Type string or string[]
Default in TypeScript 5.9 not set
Description in the tsconfig.json schema Path to base configuration file to inherit from.

The description is quoted from the tsconfig.json schema published by SchemaStore (Apache-2.0), which carries the descriptions TypeScript does not ship for top-level keys; see the notices.

Examples

main.js Error confirmed 5.9.3 TypeScript 5.9.3, run 21 October 2026: main.js(2,24): error TS7006: Parameter 'n' implicitly has an 'any' type. 6.0.3 TypeScript 6.0.3, run 21 October 2026: the same as 5.9.3. main.js(2,24): error TS7006: Parameter 'n' implicitly has an 'any' type. 7.0.2 TypeScript 7.0.2, run 21 October 2026: the same as 5.9.3. main.js(2,24): error TS7006: Parameter 'n' implicitly has an 'any' type. checked 21 October 2026
export function double(n) {error TS7006: Parameter 'n' implicitly has an 'any' type.
  return n * 2;
}
A jsconfig.json that extends a shared base: strict comes from the base.
jsconfig.json for this example
{
  "extends": "./jsconfig.base.json",
  "compilerOptions": {
    "noEmit": true
  },
  "include": [
    "*.js"
  ]
}

Extending a jsconfig.json brings its defaults

A file named jsconfig.json has defaults of its own (allowJs, noEmit, skipLibCheck and more). A config that extends one inherits them, written or not. That matters for a second config that should write files: it inherits noEmit: true and writes nothing until it sets "noEmit": false, as on the declaration page.

One base for many packages

In a repository with several packages, give each package a small jsconfig.json that extends a shared one and sets its own include. Editors then check each file with the config of its package, and one place holds the strictness level for all of them. The monorepo setup is a complete example.

packages/app/jsconfig.json
{
  "extends": "../../jsconfig.json",
  "include": ["src/**/*.js"]
}

Gotchas

  • references is the one top-level key that is never inherited.

Sources

Last reviewed 20 October 2026.