Support TypeBox validation library #225
Closed
peguerosdc
started this conversation in
Ideas
Replies: 2 comments
-
TypeBox support will be available in the library when #228 gets merged. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Support included in v7.5.0 |
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
-
Context
Hi! I wanted to try
[email protected]
, but all my validations depend on sinclairzx81/typebox becausezod
has historically given me performance issues, so I tried to create aSafeActionClient
for this schema validation library by mimicking what I found in next-safe-action/src/adapters:The Problem
I can't use the client without typescript complaining:
Feature Request
I think the problem is that the
Schema
's type definition is coupled to the available libraries.If you think it would be a good contribution, I can add
typebox
with some guidance to make the library fit my use-case for now, being aware that it would eventually need to be improved.From what I saw, I think I'll need to create an
adapter
file with my code above and change theadapter/types.ts
to make use of:in both
Infer
andInferIn
, as well as add theIfInstalled<TSchema>
to theSchema
type.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions