UNPKG

domain-objects

Version:

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

11 lines (10 loc) 524 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 isZodSchema: (schema: SchemaOptions<any>) => schema is ZodSchema<any, unknown, import("zod/v4/core").$ZodTypeInternals<any, unknown>>; export declare const validate: ({ domainObjectName, schema, props, }: { domainObjectName: string; schema: SchemaOptions<any>; props: any; }) => void;