Skip to content

Commit 0714e5c

Browse files
committed
fix(js): set composite to false when running type-check in noEmit mode
When a project's tsconfig inherits composite: true from a base config, running runTypeCheck in noEmit mode results in { composite: true, noEmit: true }. In this state, TypeScript's program.emit() still writes a minimal 19-byte tsbuildinfo file, which poisons subsequent tsc --build runs that use timestamp-based up-to-date checks. This causes a race condition when typecheck and build targets run in parallel: the esbuild executor writes the poisoned tsbuildinfo, then tsc --build sees it and skips .d.ts emission, causing TS6305 errors in downstream projects. Setting composite: false alongside noEmit: true prevents TypeScript from writing the tsbuildinfo file, eliminating the race condition. Closes #34492
1 parent b89c308 commit 0714e5c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/js/src/utils/typescript/run-type-check.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ async function setupTypeScript(options: TypeCheckOptions) {
140140
? options.outDir.replace(projectRoot, '')
141141
: undefined,
142142
}
143-
: { noEmit: true };
143+
: { noEmit: true, composite: false };
144144

145145
const compilerOptions = {
146146
...config.options,

0 commit comments

Comments
 (0)