Demo of an unusual behavior in the TypeScript compiler.
large.ts
is supposed to not be checked due to // @ts-nocheck
.
It doesn't get checked during an initial compile.
However, if some file it imports changes, and a subsequent incremental compile
is performed, the compiler spends CPU time type checking on the file. I don't think
diagnostics are reported from the checking, however the compiler is simply
performing extra work that seems unnecessary.
npm install
npm run build
(does tsc invocation with--generateTrace
)- Observe that
./traces/trace.json
does not contain anycheckSourceFile
entries forlarge.ts
. - Change
other.ts
(change the number inside, etc.) npm run build
- Observe that the new
./traces/trace.json
does containcheckSourceFile
forlarge.ts
, as well as various other entries that indicate it did semantic analysis of the file.
I included traces-1
and traces-2
folders in the repository that show my trace logs from the above workflow. traces-2
is from the second incremental compile that shouldn't have checked large.ts
.