chore: add example

This commit is contained in:
Divlo
2022-08-26 20:19:31 +02:00
parent 37b4b9b990
commit 676a70b1a9
42 changed files with 6029 additions and 3666 deletions

10
example/models/User.ts Normal file
View File

@ -0,0 +1,10 @@
import { Static, Type } from '@sinclair/typebox'
export const userSchema = {
name: Type.String({ minLength: 3, maxLength: 10 }),
email: Type.String({ minLength: 1, maxLength: 254, format: 'email' })
}
export const userObjectSchema = Type.Object(userSchema)
export type User = Static<typeof userObjectSchema>