Revision 0.8.0
This commit is contained in:
23
example/index.ts
Normal file
23
example/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Box } from '@sinclair/typebox-remix'
|
||||
import * as v from 'valibot'
|
||||
import * as z from 'zod'
|
||||
|
||||
// Valibot to TypeBox (Runtime)
|
||||
|
||||
const V = Box(
|
||||
v.object({
|
||||
x: v.number(),
|
||||
y: v.number(),
|
||||
z: v.number(),
|
||||
}),
|
||||
)
|
||||
|
||||
// Zod to TypeBox (Static)
|
||||
|
||||
const Z = Box(
|
||||
z.object({
|
||||
a: z.string(),
|
||||
b: z.string(),
|
||||
c: z.string(),
|
||||
}),
|
||||
)
|
||||
Reference in New Issue
Block a user