Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

TypeScript Project Reference Re-export Stale Repro

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 repro

Observed with TypeScript 7.0.1-rc.

Related but broader prior issue: microsoft/TypeScript#46153.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages