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

22 lines
972 B
Plaintext

import { TSchema } from '../type/schema/index';
import { ValueErrorIterator, ValueErrorType } from './errors';
/** 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;