You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow --noEmit to override incremental: true from tsconfig.json #38440
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.)
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.
Activity
RyanCavanaugh commentedon Jun 5, 2020
Sheetal Nandi (@sheetalkamat) thoughts?
sheetalkamat commentedon Jun 5, 2020
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 --noEmitandtscwhere tsbuild info file remains same, and hence had decided to file separate PR for this.Allow noEmit with incremental and composite
Allow noEmit with incremental and composite
Allows emitting buildInfo when --noEmit is specified (#39122)