Class ZodType<Output, Def, Input>Abstract
Constructors
Properties
Readonly
_def
Readonly
_input
Readonly
_output
Readonly
_type
spa
Accessors
description
- get description(): undefined | string
Returns undefined | string
Methods
_getOrReturnCtx
- _getOrReturnCtx(input, ctx?): ParseContext
_getType
- _getType(input): string
Returns string
Abstract
_parse
- _parse(input): ParseReturnType<Output>
_processInputParams
- _processInputParams(input): {
ctx: ParseContext;
status: ParseStatus;
}
brand
- brand<B>(brand?): ZodBranded<ZodType<Output, Def, Input>, B>
Type Parameters
- B extends string | number | symbol
describe
- describe(description): this
Returns this
isNullable
- isNullable(): boolean
Returns boolean
isOptional
- isOptional(): boolean
Returns boolean
parse
- parse(data, params?): Output
parseAsync
- parseAsync(data, params?): Promise<Output>
Returns Promise<Output>
refine
- refine<RefinedOutput>(check, message?): ZodEffects<ZodType<Output, Def, Input>, RefinedOutput, Input>
- refine(check, message?): ZodEffects<ZodType<Output, Def, Input>, Output, Input>
refinement
- refinement<RefinedOutput>(check, refinementData): ZodEffects<ZodType<Output, Def, Input>, RefinedOutput, Input>
- refinement(check, refinementData): ZodEffects<ZodType<Output, Def, Input>, Output, Input>
superRefine
- superRefine<RefinedOutput>(refinement): ZodEffects<ZodType<Output, Def, Input>, RefinedOutput, Input>
- superRefine(refinement): ZodEffects<ZodType<Output, Def, Input>, Output, Input>
- superRefine(refinement): ZodEffects<ZodType<Output, Def, Input>, Output, Input>
Parameters
- refinement: ((arg: Output, ctx: RefinementCtx) => Promise<void>)
- (arg, ctx): Promise<void>
Returns Promise<void>
Alias of safeParseAsync