Skip to content

Commit f30f3fb

Browse files
committed
Document array values for tsconfig extends
1 parent e89bda9 commit f30f3fb

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

  • packages/tsconfig-reference/copy/en/options

packages/tsconfig-reference/copy/en/options/extends.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ display: "Extends"
33
oneline: "Specify one or more path or node module references to base configuration files from which settings are inherited."
44
---
55

6-
The value of `extends` is a string which contains a path to another configuration file to inherit from.
7-
The path may use Node.js style resolution.
6+
The value of `extends` is a string which contains a path to another configuration file to inherit from, or an array of paths to multiple base configuration files.
7+
The path or paths may use Node.js style resolution.
88

9-
The configuration from the base file are loaded first, then overridden by those in the inheriting config file. All relative paths found in the configuration file will be resolved relative to the configuration file they originated in.
9+
Base configuration files are loaded first, then overridden by those in the inheriting config file. When `extends` is an array, later entries override earlier entries. All relative paths found in the configuration file will be resolved relative to the configuration file they originated in.
1010

1111
It's worth noting that [`files`](#files), [`include`](#include), and [`exclude`](#exclude) from the inheriting config file _overwrite_ those from the
1212
base config file, and that circularity between configuration files is not allowed.
@@ -46,4 +46,13 @@ Currently, the only top-level property that is excluded from inheritance is [`re
4646
}
4747
```
4848

49+
`tsconfig.app.json`:
50+
51+
```json tsconfig
52+
{
53+
"extends": ["./configs/base", "./tsconfig.nostrictnull"],
54+
"files": ["main.ts", "app.ts"]
55+
}
56+
```
57+
4958
Properties with relative paths found in the configuration file, which aren't excluded from inheritance, will be resolved relative to the configuration file they originated in.

0 commit comments

Comments
 (0)