UNPKG

dockest

Version:

Dockest is an integration testing tool aimed at alleviating the process of evaluating unit tests whilst running multi-container Docker applications.

32 lines (31 loc) 1.22 kB
import { z } from 'zod'; type CustomZodErrorMapOptions = { /** * Append the input data to the default error message. */ appendInputData?: boolean; }; /** * Create a custom ZodErrorMap with options to append input data to the default error message. * * `customZodErrorMap` can also be used in individual parsings, for example: * `Person.safeParse(person, { errorMap: customZodErrorMap() });` */ export declare function customZodErrorMap(customZodErrorMapOptions?: CustomZodErrorMapOptions): z.ZodErrorMap; /** * There can only be one global ZodErrorMap set at any one time. * * Using this function will set the global ZodErrorMap to `customZodErrorMap`. * * The default ZodErrorMap can still be used in individual parsings, for example: * `Person.safeParse(person, { errorMap: z.defaultErrorMap });` */ export declare function setGlobalCustomZodErrorMap(options?: CustomZodErrorMapOptions): void; /** * There can only be one global ZodErrorMap set at any one time. * * Using this function will reset the global ZodErrorMap to `z.defaultErrorMap`, * essentially overriding the previous global ZodErrorMap. */ export declare function resetGlobalCustomZodErrorMap(): void; export {};