import { ParseParams, MakeErrorData } from '../parser'; import { ZodArray, ZodTransformer, ZodError } from '../index'; import { ZodOptionalType } from './optional'; import { ZodNullableType } from './nullable'; import { ZodCustomIssue } from '../ZodError'; export declare enum ZodTypes { string = "string", number = "number", bigint = "bigint", boolean = "boolean", date = "date", undefined = "undefined", null = "null", array = "array", object = "object", union = "union", intersection = "intersection", tuple = "tuple", record = "record", function = "function", lazy = "lazy", literal = "literal", enum = "enum", nativeEnum = "nativeEnum", promise = "promise", any = "any", unknown = "unknown", never = "never", void = "void", transformer = "transformer", optional = "optional", nullable = "nullable" } export declare type ZodTypeAny = ZodType; export declare type ZodRawShape = { [k: string]: ZodTypeAny; }; export declare const inputSchema: (schema: ZodType) => ZodType; export declare const outputSchema: (schema: ZodType) => ZodType; declare type InternalCheck = { check: (arg: T, ctx: { addIssue: (arg: MakeErrorData) => void; }) => any; }; export interface ZodTypeDef { t: ZodTypes; checks?: InternalCheck[]; accepts?: ZodType; } export declare type TypeOf> = T['_output']; export declare type input> = T['_input']; export declare type output> = T['_output']; export declare type infer> = T['_output']; export declare abstract class ZodType { readonly _type: Output; readonly _output: Output; readonly _def: Def; readonly _input: Input; parse: (x: unknown, params?: ParseParams) => Output; safeParse: (x: unknown, params?: ParseParams) => { success: true; data: Output; } | { success: false; error: ZodError; }; parseAsync: (x: unknown, params?: ParseParams) => Promise; safeParseAsync: (x: unknown, params?: ParseParams) => Promise<{ success: true; data: Output; } | { success: false; error: ZodError; }>; spa: (x: unknown, params?: ParseParams | undefined) => Promise<{ success: true; data: Output; } | { success: false; error: ZodError; }>; is(u: Input): u is Input; check(u: unknown): u is Input; refine: any>(check: Func, message?: string | Partial> | ((arg: Output) => Partial>)) => this; refinement: (check: (arg: Output) => any, refinementData: (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | (Pick & { path?: (string | number)[] | undefined; }) | ((arg: Output) => MakeErrorData)) => this; _refinement: (refinement: InternalCheck['check']) => this; constructor(def: Def); abstract toJSON: () => object; optional: () => ZodOptionalType; or: () => ZodOptionalType; nullable: () => ZodNullableType; array: () => ZodArray; transform, Tx extends (arg: This['_output']) => U['_input'] | Promise>(input: U, transformer: Tx): ZodTransformer; transform This['_input'] | Promise>(transformer: Tx): ZodTransformer; default: = ReturnType>(def: T) => ZodTransformer; isOptional: () => boolean; isNullable: () => boolean; } export {};