Effect CommunityEC
Effect Community2y ago
18 replies
arekmaz

Validating with Multiple Schemas Without Using `Schema.Union`

hi, how can I validate with an union of schemas?

(I specifically don't want Schema.Union because in the end it will be just one specific schema)

union fixes the type error, but I'm aware that it will cause input to be decoded potentically two times in case of error

playground: https://effect.website/play#61530f34d15e
image.png
Was this page helpful?