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
test: align optional property assertions with actual inferred types
TypeScript 6.0 tightened isTypeIdenticalTo under exactOptionalPropertyTypes
so that {a?: T} and {a?: T | undefined} are no longer treated as identical
(microsoft/TypeScript#61682). expect-type's toEqualTypeOf, which piggybacks
on that internal check, now correctly distinguishes them.
Zod's .optional()/.partial()/.pick()/.merge() and tuple optionals all emit
{a?: T | undefined} (and tuple equivalents). The test assertions were
written without `| undefined`; TS 5.x's lenient identity check let it
slide. Make the assertions match what Zod actually emits so the suite
passes on TS 5.5, 5.9, and 6.0.
No source changes; only test assertions.
0 commit comments