Thin MongoDB ODM built for Standard Schema
mongodb zod deno
1import type { z } from "@zod/zod"; 2import type { ObjectId } from "mongodb"; 3 4type Schema = z.ZodObject; 5type Infer<T extends Schema> = z.infer<T>; 6 7export type InferModel<T extends Schema> = Infer<T> & { 8 _id?: ObjectId; 9}; 10 11export type InsertType<T extends Schema> = Omit<Infer<T>, "createdAt"> & { 12 createdAt?: Date; 13};