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

Allow --noEmit to override incremental: true from tsconfig.json #38440

Closed
5 tasks done
dandv opened this issue May 9, 2020 · 2 comments · Fixed by #39122
Closed
5 tasks done

Allow --noEmit to override incremental: true from tsconfig.json #38440

dandv opened this issue May 9, 2020 · 2 comments · Fixed by #39122
Assignees
Labels
Fix Available A PR has been opened for this issue Suggestion An idea for TypeScript

Comments

@dandv
Copy link
Contributor

dandv commented May 9, 2020

Search Terms

noEmit incremental override type-check

Suggestion

If --noEmit is specified on the command line, ignore the incremental: true setting from tsconfig.json.

Use Cases

I want to have a type-check npm script that runs tsc --noEmit, only for type checking. Whether incremental was set to true in tsconfig.json, shouldn't prevent that, because this isn't a build.

Examples

Currently, this leads to

Option 'noEmit' cannot be specified with option 'incremental'

Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.
@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Jun 5, 2020
@RyanCavanaugh
Copy link
Member

@sheetalkamat thoughts?

@sheetalkamat
Copy link
Member

While working on #38853 i did consider this and i think it would be ok to write tsbuildInfo file when --noEmit is specified. But we should handle difference between running
tsc --noEmit and tsc where tsbuild info file remains same, and hence had decided to file separate PR for this.

@sheetalkamat sheetalkamat added Fix Available A PR has been opened for this issue Suggestion An idea for TypeScript and removed Needs Investigation This issue needs a team member to investigate its status. labels Jun 17, 2020
@sheetalkamat sheetalkamat added this to the TypeScript 4.0 milestone Jun 17, 2020
sheetalkamat added a commit that referenced this issue Jun 18, 2020
* Some tests

* Allow noEmit with incremental and composite
Fixes #38440
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Available A PR has been opened for this issue Suggestion An idea for TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants