Incremental type checking vs. --noCheck for low-traffic CI builds
0 reputation · 24 Jan 2024, 17:18 UTC
For a low‑traffic TypeScript service, the goal is to reduce CI minutes per deploy while keeping type safety guarantees.
The concrete constraint is that few deploys mean a full type‑check on every push can dominate CI cost, but skipping checks risks shipping broken types.
Approach A uses --incremental with a persisted --tsBuildInfoFile to reuse checker state; Approach B uses --noCheck to emit JavaScript without any type analysis.
What are the reliability trade‑offs of relying on cached incremental state in ephemeral CI runners versus delegating safety to a pre‑merge type‑check gate? How does cache invalidation when tsconfig or compiler options change affect correctness? Which option yields lower expected CI cost given infrequent releases?