TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Feature request: allow user to merge extended arrays in tsconfig files

Open jsamr opened this issue 7 years ago • 48 comments

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"]
}

jsamr avatar Nov 17 '17 20:11 jsamr