IssueRaiser

Proposal for merging array or object options in tsconfig file

### πŸ” Search Terms "extends", "merge", "compilerOptions", "paths", "outdir", "include", "exclude", "typeRoots", "tsconfig", "ability to merge tsconfig" ### βœ… Viability Checklist - [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code - [X] This wouldn't change the runtime behavior of existing JavaScript code - [X] This could be implemented without emitting different JS based on the types of the expressions - [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.) - [X] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types - [X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals ### ⭐ Suggestion Subset of #56436 Today when you extend a config the options written in the final config override the options from the base config. Here is sample of what happens today: ```jsonc // @fileName: /temp/test/base.tsconfig.json { "compilerOptions": { "paths": { "@libs/*": ["libs/*"], "@project1/*": ["project1/*"] }, "typeRoots": ["node_modules/@types"], } } ``` ```jsonc // @fileName: /temp/test/project1/tsconfig.json { "extends": "../base.tsconfig.json", "compilerOptions": { "paths": { "@environment/*": ["env/*"] }, "typeRoots": ["typings"]

Posted by sheetalkamat on Feb 22, 2024, 6:11 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Software)

Proposal for merging array or object options in tsconfig file

sheetalkamatFeb 22, 2024, 6:11 PM

### πŸ” Search Terms "extends", "merge", "compilerOptions", "paths", "outdir", "include", "exclude", "typeRoots", "tsconfig", "ability to merge tsconfig" ### βœ… Viability Checklist - [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code - [X] This wouldn't change the runtime behavior of existing JavaScript code - [X] This could be implemented without emitting different JS based on the types of the expressions - [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.) - [X] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types - [X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals ### ⭐ Suggestion Subset of #56436 Today when you extend a config the options written in the final config override the options from the base config. Here is sample of what happens today: ```jsonc // @fileName: /temp/test/base.tsconfig.json { "compilerOptions": { "paths": { "@libs/*": ["libs/*"], "@project1/*": ["project1/*"] }, "typeRoots": ["node_modules/@types"], } } ``` ```jsonc // @fileName: /temp/test/project1/tsconfig.json { "extends": "../base.tsconfig.json", "compilerOptions": { "paths": { "@environment/*": ["env/*"] }, "typeRoots": ["typings"]

Comments (0)

No comments yet. Start the discussion.

Comment on this issue