Class ZodType<Output, Def, Input>Abstract
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
_processInputParams
- _processInputParams(input): {
ctx: ParseContext;
status: ParseStatus;
}
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>
Parameters
- check: ((arg) => boolean)
- (arg): boolean
Returns boolean
- refinementData: IssueData | ((arg, ctx) => IssueData)
superRefine
- superRefine<RefinedOutput>(refinement): ZodEffects<ZodType<Output, Def, Input>, RefinedOutput, Input>
- superRefine(refinement): ZodEffects<ZodType<Output, Def, Input>, Output, Input>
Parameters
- refinement: ((arg, ctx) => void)
- (arg, ctx): void
Returns void
- superRefine(refinement): ZodEffects<ZodType<Output, Def, Input>, Output, Input>
Parameters
- refinement: ((arg, ctx) => Promise<void>)
- (arg, ctx): Promise<void>
Returns Promise<void>
Alias of safeParseAsync