-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Feature: TypeBoxValidatorCompiler #24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@sinclairzx81 are you fixing the other tests with |
@mcollina It's ok, all fixed in this PR :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Checklist
npm run test
andnpm run benchmark
and the Code of conduct
This PR implements the TypeBox TypeCompiler mentioned on issue #23. This compiler can used to attain faster runtime validation performance (roughly 1.5x the performance of AJV), as well as significantly increase schema compilation time. Note this compiler only accepts TypeBox types for compilation, and thus should be considered optional from a users standpoint.
Documentation on the Compiler and associated Benchmarks can be located on the TypeBox repository located here. Current benchmarks listed below.
Validate
This benchmark measures overall validate performance. You can review this benchmark here.
Compile
This benchmark measures schema compilation time. You can review this benchmark here.
Additional Updates
@example
forTypeBoxTypeProvider
andTypeBoxValidatorCompiler
respectively. (Useful for vscode intellisense)Not implemented
Type
and and associated types on this provider (note: re-exporting TypeBox currently causes coverage tests to fall below threshold)Submitting for review