| Server IP : 159.203.156.69 / Your IP : 216.73.216.37 Web Server : nginx/1.24.0 System : Linux main-ubuntu 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/tanviranik.com/node_modules/zod-validation-error/v4/ |
Upload File : |
import * as zod from 'zod/v4/core';
declare const ZOD_VALIDATION_ERROR_NAME = "ZodValidationError";
interface ErrorOptions {
cause?: unknown;
}
declare class ValidationError extends Error {
name: typeof ZOD_VALIDATION_ERROR_NAME;
details: Array<zod.$ZodIssue>;
constructor(message?: string, options?: ErrorOptions);
toString(): string;
}
declare function isValidationError(err: unknown): err is ValidationError;
declare function isValidationErrorLike(err: unknown): err is ValidationError;
declare function isZodErrorLike(err: unknown): err is zod.$ZodError;
type ErrorMapOptions = {
dateLocalization: boolean | Intl.LocalesArgument;
numberLocalization: boolean | Intl.LocalesArgument;
displayInvalidFormatDetails: boolean;
allowedValuesSeparator: string;
allowedValuesLastSeparator: string | undefined;
wrapAllowedValuesInQuote: boolean;
maxAllowedValuesToDisplay: number;
unrecognizedKeysSeparator: string;
unrecognizedKeysLastSeparator: string | undefined;
wrapUnrecognizedKeysInQuote: boolean;
maxUnrecognizedKeysToDisplay: number;
};
declare function createErrorMap(partialOptions?: Partial<ErrorMapOptions>): zod.$ZodErrorMap<zod.$ZodIssue>;
type NonEmptyArray<T> = [T, ...T[]];
type ZodIssue = zod.$ZodIssue;
type MessageBuilder = (issues: NonEmptyArray<ZodIssue>) => string;
type MessageBuilderOptions = {
prefix: string | null | undefined;
prefixSeparator: string;
maxIssuesInMessage: number;
issueSeparator: string;
unionSeparator: string;
includePath: boolean;
forceTitleCase: boolean;
};
declare function createMessageBuilder(partialOptions?: Partial<MessageBuilderOptions>): MessageBuilder;
type ZodError = zod.$ZodError;
type FromZodErrorOptions = {
messageBuilder: MessageBuilder;
} | Partial<MessageBuilderOptions>;
declare function fromZodError(zodError: ZodError, options?: FromZodErrorOptions): ValidationError;
declare function fromError(err: unknown, options?: FromZodErrorOptions): ValidationError;
type FromZodIssueOptions = {
messageBuilder: MessageBuilder;
} | Partial<Omit<MessageBuilderOptions, 'maxIssuesInMessage'>>;
declare function fromZodIssue(issue: ZodIssue, options?: FromZodIssueOptions): ValidationError;
declare const toValidationError: (options?: FromZodErrorOptions) => (err: unknown) => ValidationError;
export { type ErrorMapOptions, type ErrorOptions, type FromZodErrorOptions, type FromZodIssueOptions, type MessageBuilder, type MessageBuilderOptions, type NonEmptyArray, ValidationError, type ZodError, type ZodIssue, createErrorMap, createMessageBuilder, fromError, fromZodError, fromZodIssue, isValidationError, isValidationErrorLike, isZodErrorLike, toValidationError };