UNPKG

@freeword/meta

Version:

Meta package for Freeword: exports all core types, constants, and utilities from the src/ directory.

34 lines 2.34 kB
import type { ZodIssueOptionalMessage } from 'zod'; import type { Story } from '../checks/BasicChecks.ts'; import type { ZIssue, Zchecker, ProtoZodIssue, TKZodError, ZodSubIssue } from './ZodInternal.ts'; import { type stringifyOpts, type shortenOpts } from '../utils/BaseUtils.ts'; interface ErrorMapIssueContext { data: any; defaultError: string; } export declare function customErrorMap(issue: ZodIssueOptionalMessage, ctx: ErrorMapIssueContext): { message: string; }; export interface FormatZMessageOpts { checker?: Zchecker; step?: 'repair' | 'unionize' | 'ceMap'; ctx?: ErrorMapIssueContext; unionized?: boolean | undefined; story?: Story; } export declare const PRESENCE_REQD: Set<"unrecognized_keys" | "custom" | "invalid_union" | "invalid_union_discriminator" | "invalid_arguments" | "invalid_return_type" | "invalid_string" | "not_multiple_of" | "invalid_literal" | "invalid_type" | "invalid_enum_value" | "invalid_intersection_types" | "invalid_date" | "not_finite" | "too_big" | "too_small">; export declare const SKIP_VALPART: Set<"unrecognized_keys" | "custom" | "invalid_union" | "invalid_union_discriminator" | "invalid_arguments" | "invalid_return_type" | "invalid_string" | "not_multiple_of" | "invalid_literal" | "invalid_type" | "invalid_enum_value" | "invalid_intersection_types" | "invalid_date" | "not_finite" | "too_big" | "too_small">; export declare function makeCustomMessage(issue: ZodIssueOptionalMessage, subj: any, defaultError: string, opts?: FormatZMessageOpts): any; export declare function getBadprop(issue: ZodIssueOptionalMessage, subj: any, opts?: FormatZMessageOpts): any; interface DisplayOpts extends stringifyOpts, shortenOpts { len?: number; brace?: boolean; } export declare function display(val: any, opts?: DisplayOpts): string; export declare function frenchbrace(str: string): string; export declare function isVacant(badprop: any): boolean; export declare function repairError<RT, ZE extends TKZodError<RT>>(err: ZE, subj: any, checker: Zchecker, story?: Story): ZE; export declare function assemblePathedIssue(path: (string | number)[], issues: ZodSubIssue[], _subj: any): ZIssue; export declare function repairIssues(issues: ProtoZodIssue[], subj: any, checker: Zchecker, story: Story): void; export {}; //# sourceMappingURL=ZodReporting.d.ts.map