UNPKG

drizzle-zod

Version:

Generate Zod schemas from Drizzle ORM schemas

10 lines (9 loc) 712 B
import type { CreateInsertSchema, CreateSchemaFactoryOptions, CreateSelectSchema, CreateUpdateSchema } from './schema.types.js'; export declare const createSelectSchema: CreateSelectSchema<undefined>; export declare const createInsertSchema: CreateInsertSchema<undefined>; export declare const createUpdateSchema: CreateUpdateSchema<undefined>; export declare function createSchemaFactory<TCoerce extends Partial<Record<'bigint' | 'boolean' | 'date' | 'number' | 'string', true>> | true | undefined>(options?: CreateSchemaFactoryOptions<TCoerce>): { createSelectSchema: CreateSelectSchema<TCoerce>; createInsertSchema: CreateInsertSchema<TCoerce>; createUpdateSchema: CreateUpdateSchema<TCoerce>; };