ReviewOS

home-lang/home

TypeScript parity: forward overloads and logical member flow

#770
Closed chris opened this 8 days ago ·
8 days ago

Tracks the TypeScript compatibility batch for source-file forward overload calls and post-logical-assignment member flow, as part of #66 and #548.

Two independent checker gaps affected the pinned Zod project:

  • Calls before a top-level overload group only saw the first four-parameter declaration, so valid five-argument calls reported TS2554. Eagerly prechecking every source-file function is unsafe because generic signatures can precede the types they reference; overload groups are now discovered and lowered lazily at the forward call.
  • ??= / ||= flow propagation only recorded identifier targets. Optional member and element targets remained nullable after initialization. Their post-assignment flow is now recorded, while assignable object/array/literal RHS values retain the declared non-nullish slot type (for example Record<string, Node> rather than raw {}).

Implemented in 6a947ea.

Validation:

  • Type checker: 4,385/4,385 tests pass in ReleaseFast.
  • Full ReleaseFast build with JSC: 50/50 steps pass.
  • Pinned Zod v4.5.2 core oracle: 34 diagnostics -> 30, removing four expected false positives with zero additions.
  • Focused forward-overload, member-flow, formatting, diff, and Pickier checks pass.
8 days ago

Completed on origin/main by 6a947ead5, authored and committed by Chris Breuer without coauthors.

Final verification: checker 4,385/4,385; ReleaseFast build 50/50; pinned Zod v4.5.2 core 34 -> 30 with exactly four expected removals and zero additions; formatting, diff checks, and focused Pickier clean. Continued parity work remains tracked in #66 and #548.

Sign in to comment on this issue.