UNPKG

@cdwr/core

Version:

A set of core utilities for the Codeware ecosystem.

25 lines (24 loc) 638 B
import { z } from 'zod'; export type ValidationError = { path: (string | number)[]; code: string; message: string; }; export type ValidationResult = { success: boolean; details?: string; parsed?: unknown; errors?: ValidationError[]; }; /** * @internal * Validates a schema against a fixture. * * @param schema - The schema to validate against * @param data - The fixture data to validate * @param options - Additional options * @returns A validation result */ export declare function validateSchema<T extends z.ZodTypeAny>(schema: T, data: unknown, options?: { name?: string; }): ValidationResult;