-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Feature request: exclude outDir by default in tsconfig.json #20108
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
Comments
Not sure i understand the request, c:\test\20108>tree /F
│ a.ts
│ tsconfig.json
│
└───outDir
b.ts
c:\test\20108>type tsconfig.json
{
"compilerOptions": {
"target": "es5",
"outDir": "./outDir"
}
}
c:\test\20108>tsc --v
Version 2.7.0-dev.20171109
c:\test\20108>tsc --listFiles
C:/Users/mhegazy/AppData/Roaming/npm/node_modules/typescript/lib/lib.d.ts
c:/test/20108/a.ts |
I have a configuration where it doesn't. I'll work on a MWE and come back to you ! |
@mhegazy I think I have found the reason : default excluded values are overwritten instead of merged when setting your own custom values. |
If you define your own excludes we get out of the exclude business altogether. I recommmend using include instead. |
@mhegazy OK thanks for that clarification. However, |
I have not seen requests for this before to be frank. leaving this issue open to gather more user feedback. |
@mhegazy
But it really surprised me, since I expected the outdir to be excluded by default. |
My scenario was I checked out react-native-template-typescript, ran |
Scenario: As a user, I want typescript compiler to default-exclude output transpiled files to
compilerOptions.outDir
withcompilerOptions.declaration
property set totrue
. I would expect thatoutDir
is excluded by default, because:outDir
by error, which is easy to do with intellisenseTS5055
errors such as spotted in TypeScript complains about overwriting .d.ts files that are potentially known outputs #16749 and tsc generating TS5055 error when generating declaration files #6046tsc
CLI has already implemented this behaviour, see PR exclude outDir and add more default excludes #8703The text was updated successfully, but these errors were encountered: