-
Notifications
You must be signed in to change notification settings - Fork 146
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
No coercion in intersection of unions #787
Comments
@nicolabovolato Hi, Thanks for reporting! Yes, this is a known limitation with TypeBox's current Convert logic. Looking at the code, I think it needs a review. Will investigate this when I next get some time to dig into the code, however keep in mind, a fix may take some time to implement (as intersection value handling is very complex and has been deferred a few times before, and there is a little bit of cross over with intersection handling elsewhere in the library which I'd like to take a look at also) Will keep this issue open in the interim. |
@nicolabovolato Hi! Hey, have pushed a fix for this on revision 0.32.16. The update should perform the intersected/union conversion, but just be mindful to always check the return value from Convert (as there are many cases where conversion may not be possible). If you experience any issues with the update, feel free to ping on this thread. Thanks again for reporting! |
Hi,
I'm using Typebox 0.32.15 and this parse function, it looks like string coercion is not working properly when combining intersections and unions.
The text was updated successfully, but these errors were encountered: