You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--incremental retains stale diagnostics when augmenting a re-exported interface #64386
Run npm run check. The initial TS2322 error is expected.
Change only value: number to value: string in src/augment.ts.
Run npm run check again, retaining the build cache.
Delete .cache/tsconfig.tsbuildinfo and run npm run check again, without changing any source.
🙁 Actual behavior
Step 3 still reports this error in src/consumer.ts:
error TS2322: Type 'string' is not assignable to type 'number'.
Step 4 succeeds. Incremental and clean builds disagree on identical source files.
🙂 Expected behavior
Step 3 should succeed, matching the clean build. The augmentation now declares value: string.
Additional information about the issue
Changing both ./index.js paths in src/augment.ts to ./registry.js avoids the stale error. Defining Registry in src/index.ts and re-exporting it from src/registry.ts also avoids it. Both controls were verified on all three compiler versions above.
Related: #44094, fixed by #45156, concerns missed augmentation updates during incremental compilation. #63960 also involves augmentation through a type-only re-export, but reports a file-order issue.
Activity