@ai2070/l0
Version:
L0: The Missing Reliability Substrate for AI
21 lines • 924 B
TypeScript
import type { z } from "zod";
export type AnyZodSchema = z.ZodTypeAny;
export type ZodObjectSchema<T extends z.ZodRawShape = z.ZodRawShape> = z.ZodObject<T>;
export type ZodArraySchema<T extends z.ZodTypeAny = z.ZodTypeAny> = z.ZodArray<T>;
export type ZodValidationError = z.ZodError;
export type InferSchema<T extends z.ZodTypeAny> = z.infer<T>;
export declare function isZodSchema(value: unknown): value is z.ZodTypeAny;
export declare function isZodError(error: unknown): error is z.ZodError;
export declare function safeParse<T extends z.ZodTypeAny>(schema: T, data: unknown): {
success: true;
data: z.infer<T>;
} | {
success: false;
error: z.ZodError;
};
export declare function getZodErrorMessages(error: z.ZodError): string[];
export declare function flattenZodError(error: z.ZodError): {
formErrors: string[];
fieldErrors: Record<string, string[]>;
};
//# sourceMappingURL=zodCompat.d.ts.map