drizzle-zod
Version:
Generate Zod schemas from Drizzle ORM schemas
10 lines (9 loc) • 713 B
text/typescript
import type { CreateInsertSchema, CreateSchemaFactoryOptions, CreateSelectSchema, CreateUpdateSchema } from "./schema.types.mjs";
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>;
};