UNPKG

@varasto/express-crud

Version:

Express.js CRUD generator that uses Varasto storage

17 lines (16 loc) 458 B
import { JsonObject } from 'type-fest'; import { ZodType } from 'zod/v4'; /** * Various options that can be given to an router. */ export type RouterOptions<T extends JsonObject = JsonObject> = { /** * Function used to generate keys for new items. If omitted, UUIDs will be * generated as keys instead. */ keyGenerator: (data: T) => string; /** * Optional schema to validate data against. */ schema: ZodType<T>; };