resolvers
resolvers copied to clipboard
feat(typeboxResolver): make TypeBox resolver work with compiled schema
Description
- Current implementation only makes use of the dynamic validation (aka
ValueCheck
) ofTypeBox
but not itsTypeCompiler
(a high-performance JIT) which is a killer feature, especially when working with recursive or constrained type validation.
Summary of changes
- Add options for the user to pass a
TypeCheck
object (returned fromTypeCompiler.Compile()
) instead of plain schema. - Add tests
- Add document for using
TypeCompiler
- Fix typo in tests of the
ValueCheck
mode (it mentionedzod
instead oftypebox
)