This repo demonstrates an incremental tsc --build false negative with a
transitive project reference hidden behind an export * facade.
Project layout:
.
├── source/
│ ├── tsconfig.json # composite project
│ └── index.ts # exports Status
├── facade/
│ ├── tsconfig.json # composite project, references ../source
│ └── index.ts # re-exports source
└── consumer/
├── tsconfig.json # composite project, references ../facade
└── index.ts # imports Status through facade
Dependency path:
consumer/index.ts -> facade/index.ts -> source/index.ts
consumer initially typechecks when Status = "old". The repro script
then changes Status to "new". A clean build correctly fails, but the
incremental build can incorrectly pass because facade still emits the
same declaration text:
export * from "../source/index";Run:
pnpm install
pnpm reproObserved with TypeScript 7.0.1-rc.
Related but broader prior issue: microsoft/TypeScript#46153.