Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsconfig.json extends impossible to cancel / override previous settings #14184

Closed
pocesar opened this issue Feb 20, 2017 · 2 comments · Fixed by #18058
Closed

tsconfig.json extends impossible to cancel / override previous settings #14184

pocesar opened this issue Feb 20, 2017 · 2 comments · Fixed by #18058
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@pocesar
Copy link

pocesar commented Feb 20, 2017

TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)

Code

// tsconfig.json
{
   "compilerOptions": {
     "outFile": "dist/app.js"
   }
}
// extends.json
{
   "extends": "./tsconfig.json",
   "compilerOptions": {
       "outFile": null,
       "outDir": "mapped"
   }
}

Expected behavior:

Be able to "cancel" previous outFile setting by setting the "outFile" to null in the extended version

Actual behavior:

error TS5024: Compiler option 'outFile' requires a value of type string.

if outFile is set to "", it tries to write to . giving a ESDIR error in Node

@pocesar
Copy link
Author

pocesar commented Feb 20, 2017

ok, it seems that it needs to be the otherway around, the base minimum in a base.json and then "extends": "base.json" inside tsconfig.json and vendor.json with only the settings not defined in base.json

@mhegazy mhegazy added Suggestion An idea for TypeScript Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature labels Apr 27, 2017
@mhegazy mhegazy added Bug A bug in TypeScript and removed Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript labels Aug 23, 2017
@mhegazy mhegazy added this to the TypeScript 2.6 milestone Aug 23, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Aug 23, 2017

We have a few reports for this already in #16838 and #17357, we should fix this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants