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
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.
Search Terms
noEmit incremental override type-check
Suggestion
If
--noEmit
is specified on the command line, ignore theincremental: true
setting fromtsconfig.json
.Use Cases
I want to have a
type-check
npm script that runstsc --noEmit
, only for type checking. Whetherincremental
was set totrue
intsconfig.json
, shouldn't prevent that, because this isn't a build.Examples
Currently, this leads to
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: