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
export function double(n) {error TS7006: Parameter 'n' implicitly has an 'any' type.
return n * 2;
}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.
{
"extends": "../../jsconfig.json",
"include": ["src/**/*.js"]
} Gotchas
referencesis the one top-level key that is never inherited.
Sources
- TSConfig Reference: extends · TypeScript
- TypeScript 2.1 release notes · TypeScript handbook
- TypeScript 3.2 release notes · TypeScript handbook
- TypeScript 5.0 release notes · TypeScript handbook
- tsconfig.json schema · SchemaStore
Last reviewed 20 October 2026.