Parent tracking
Evidence
After #619, the unchanged pinned 106-file Zod 4.5.2 graph has 976 Home diagnostics. TS7006 remains the largest class at 368; 251 are in src/v4/classic/schemas.ts.
A strict four-file NodeNext reduction uses the same imported ProtoOf<T> pattern:
type ProtoOf<T> = {
[K in keyof T]?:
(T[K] extends (...args: infer A) => infer R ? (...args: A) => R : T[K])
| undefined;
} & ThisType<T>;The target interface contains:
- a method with optional parameters;
- a generic method with a constrained type parameter;
- a rest parameter whose element is a callable/object union;
- a generic callback parameter;
- an invalid
def?.missingcontrol.
Pinned TypeScript 6.0.3 and native TypeScript 7.0.2 report only the deliberate TS2339 at the same location. Current Home adds seven TS7006 diagnostics plus one TS7019, and misses TS2339 because the optional parameter is contextually reduced to any.
This is not Zod-specific: conditional mapped-member inference preserves simple and overload-selected signatures after #619, but does not yet preserve optional, rest, and generic parameter tuples.
Acceptance gates
- Make the reduced valid methods free of TS7006/TS7019.
- Restore the deliberate TS2339 with the same code and location as TypeScript 6 and 7.
- Preserve generic constraints, optionality, rest element types, return types, and polymorphic
thiswithout whole-type approximation or source-name special cases. - Add local and imported/barrel Program coverage, including negative assignment/property controls and lexical shadowing.
- Run Program and checker suites, Zig formatting, scoped Pickier, and
git diff --check. - Compare normalized diagnostic identities on the exact same pinned Zod graph against the exact parent; require zero additions before documenting any removal.
- Measure ReleaseFast only as a same-correctness Home A/B. Do not add Zod to the cross-compiler timing table until Home reaches the TypeScript zero-diagnostic oracle.
- Document accepted results in
docs/docs/TS_PERFORMANCE.mdand the concise linked README table.
Non-goals
- No diagnostic suppression.
- No Zod, method-name, or source-spelling special cases.
- No approximate publication of an imported interface graph.
- No benchmark filtering or discarded samples.