-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export toForest from the Decoder module #590
Comments
@camsjams I wouldn't recommend using the |
@gcanti It would be great if all errors would not be mandatory an opaque string, so we could use exhaustive check without additional wrappers or hacks. |
@gcanti Do you plan big changes? I just started using experimental API. I'm OK with refactoring. |
🚀 Feature request
Current Behavior
Decoder works great! Decoder.draw is helpful but not useful when we need HTML form validation.
Desired Behavior
It would be a nice utility to expose Decoder.toForest for some extra hands-on control of error message manipulation.
Suggested Solution
Adjust the exports:
To be:
Who does this impact? Who is this for?
This should not impact anyone AFAIK, since it just an additional exported member. This would make io-ts for html form validation messages much easier as we can utilize the
toForest
helper to do most of the lifting.Describe alternatives you've considered
The current alternative that works for our system is to just copy->paste
toForest
and its related functions into our codebase.Additional context
n/a
Your environment
The text was updated successfully, but these errors were encountered: