Open sawden opened 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please send a full reproducible code example.
Description
I recently updated TypeScript from version 4.9.5 to 5.1.3 and I noticed that my code that uses
zod
is no longer working as expected. It seems that types are not being correctly extracted when using TypeScript 5.1.3.Code to reproduce the issue
Here is the code in which I define a
zod
type:And here is the code in which I attempt to extract the discriminated union using Extract:
This code worked correctly with TypeScript 4.9.5, but after updating to TypeScript 5.1.3, the types are not extracted correctly.
Expected behavior
The types should be correctly extracted even after updating TypeScript to version 5.1.3.
Actual behavior
The types are not correctly extracted after updating to TypeScript 5.1.3.
Environment: