Files
typemap/example/index.ts
2024-12-24 23:31:06 +09:00

24 lines
349 B
TypeScript

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(),
}),
)