UNPKG

domain-objects

Version:

A simple, convenient way to represent domain objects, leverage domain knowledge, and add runtime validation in your code base.

10 lines (9 loc) 368 B
import type { Schema as JoiSchema } from 'joi'; import type { Schema as YupSchema } from 'yup'; import type { ZodSchema } from 'zod'; export type SchemaOptions<T> = ZodSchema<T> | YupSchema<T> | JoiSchema; export declare const validate: ({ domainObjectName, schema, props, }: { domainObjectName: string; schema: SchemaOptions<any>; props: any; }) => void;