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
Motivation:
I have a union of around 50 types, from which some are very complex. In this scenario input assertion takes significant time to be evaluated. As I understand superstruct union - it iterates over all union members until there's match. All of these types have a common field "type" which could be used for faster lookup.
Motivation:
I have a union of around 50 types, from which some are very complex. In this scenario input assertion takes significant time to be evaluated. As I understand superstruct union - it iterates over all union members until there's match. All of these types have a common field "type" which could be used for faster lookup.
Idea:
When checking around I noticed "zod" has something exactly like this
https://github.com/colinhacks/zod#discriminated-unions
Is this a feature you'd welcome in superstruct?
The text was updated successfully, but these errors were encountered: