Files
NapCatQQ/.pnpm-store/v3/files/a3/b0dbb910e46b012dd87ef9977ffb1cc766e17cdd8156b9cef27bc02a81d593fb556e7e693bc7a81b39226de3cb8df9ac300453547a7470a5869ce9a7861390
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
980 B
Plaintext

import { TSchema } from '../type/schema/index.mjs';
import { ValueErrorIterator, ValueErrorType } from './errors.mjs';
/** Creates an error message using en-US as the default locale */
export declare function DefaultErrorFunction(error: ErrorFunctionParameter): string;
export type ErrorFunctionParameter = {
/** The type of validation error */
errorType: ValueErrorType;
/** The path of the error */
path: string;
/** The schema associated with the error */
schema: TSchema;
/** The value associated with the error */
value: unknown;
/** Interior errors for this error */
errors: ValueErrorIterator[];
};
export type ErrorFunction = (parameter: ErrorFunctionParameter) => string;
/** Sets the error function used to generate error messages. */
export declare function SetErrorFunction(callback: ErrorFunction): void;
/** Gets the error function used to generate error messages */
export declare function GetErrorFunction(): ErrorFunction;