Replies: 2 comments
-
An example implementation can be found in zodios v11 branch |
Beta Was this translation helpful? Give feedback.
0 replies
-
we have support for https://github.com/standard-schema/standard-schema now |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello @tannerlinsley ,
New Tanstack router validation system could maybe be improved by using the TypeProvider pattern.
This would allow to not only provide zod schemas but any schemas without having to rely on custom function validator for other validation libraries.
The trick is to use
Interface
andthis
type to have High Order Kind out of the box.Here is an example of a provider i'm starting to implement in zodios to make it agnostic:
This Type provider can now be passed to
Router
like any type and still allow inference :And here an example of validator for zod that provides bot compile time and runtime validation (we can view this as a plugin):
What do you think ?
Beta Was this translation helpful? Give feedback.
All reactions