From a52435545b7a2831552b071395593ce3020f0f14 Mon Sep 17 00:00:00 2001 From: Vivek JM <24496671+vivekjm@users.noreply.github.com> Date: Tue, 30 Jun 2026 12:21:46 +0530 Subject: [PATCH] Document array values for tsconfig extends --- .../copy/en/options/extends.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/tsconfig-reference/copy/en/options/extends.md b/packages/tsconfig-reference/copy/en/options/extends.md index 085d194bbd4f..551f39ada659 100644 --- a/packages/tsconfig-reference/copy/en/options/extends.md +++ b/packages/tsconfig-reference/copy/en/options/extends.md @@ -3,10 +3,10 @@ display: "Extends" oneline: "Specify one or more path or node module references to base configuration files from which settings are inherited." --- -The value of `extends` is a string which contains a path to another configuration file to inherit from. -The path may use Node.js style resolution. +The value of `extends` is a string which contains a path to another configuration file to inherit from, or an array of strings where each entry is a path to another configuration file to inherit from. +Each path may use Node.js style resolution. -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. +The configuration from the base file is loaded first, then overridden by those in the inheriting config file. If `extends` is an array, each base configuration is loaded in order, with later entries overriding earlier entries. All relative paths found in the configuration file will be resolved relative to the configuration file they originated in. It's worth noting that [`files`](#files), [`include`](#include), and [`exclude`](#exclude) from the inheriting config file _overwrite_ those from the base config file, and that circularity between configuration files is not allowed. @@ -35,6 +35,17 @@ Currently, the only top-level property that is excluded from inheritance is [`re } ``` +`tsconfig.backend.json`: + +```json tsconfig +{ + "extends": ["./configs/base", "./configs/node"], + "compilerOptions": { + "outDir": "dist" + } +} +``` + `tsconfig.nostrictnull.json`: ```json tsconfig