Feature request: allow user to merge extended arrays in tsconfig files · Issue #20110 · microsoft/TypeScript (original) (raw)

Scenario: As a user, I would like to optionally merge extended arrays in tsconfig files. To do so, I would add a nested dot array ["..."] reminding spread operator to the property I want to merge. Here is an example:

tsconfig-base.json

{ "exclude": ["**/specs/*"] }

tsconfig-custom.json

{ "extends": "./tsconfig-base.json", "exclude": [["...tsconfig-base"], "lib"] // resolved to ["**/specs/*"; "lib"] }

Alternative: using a config {} object

tsconfig-custom.json

{ "extends": "./tsconfig-base.json", "exclude": [{ "extends": "tsconfig-base" }, "lib"] // resolved to ["**/specs/*"; "lib"] }