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
Sorry to reopen the introspection discussion again, but I've been wondering if there should be support for introspecting schemas without listing them all in a union yourself.
Personally, I recommend specifying GenericSchema and/or any specific schema type you support. This gives you more control over your code and allows you to specify what kind of schema your function supports. Note that we have added an isOfKind and isOfType type guard utility for better DX.
Sorry to reopen the introspection discussion again, but I've been wondering if there should be support for introspecting schemas without listing them all in a union yourself.
In the meantime I've created valibot-introspection, which essentially is just a large union of all schemas .
Here's an example of how it could be used to generate constraint validation attributes from a valibot schema: TS Playground
Let me know if this is something you are interested in supporting, or if it should stay as a separate library.
The text was updated successfully, but these errors were encountered: