title: Core.z. Zod Boolean

A2A Node SDK - v0.1.0 / Modules / Core / z / ZodBoolean

Class: ZodBoolean

Core.z.ZodBoolean

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

• new ZodBoolean(def): ZodBoolean

Parameters

NameType
defZodBooleanDef

Returns

ZodBoolean

Inherited from

ZodType.constructor

Properties

_def

• Readonly _def: ZodBooleanDef

Inherited from

ZodType._def


_input

• Readonly _input: boolean

Inherited from

ZodType._input


_output

• Readonly _output: boolean

Inherited from

ZodType._output


_type

• Readonly _type: boolean

Inherited from

ZodType._type


create

▪ Static create: (params?: { description?: string ; errorMap?: ZodErrorMap ; invalid_type_error?: string ; message?: string ; required_error?: string } & { coerce?: boolean }) => ZodBoolean

Type declaration

▸ (params?): ZodBoolean

Parameters
NameType
params?{ description?: string ; errorMap?: ZodErrorMap ; invalid_type_error?: string ; message?: string ; required_error?: string } & { coerce?: boolean }
Returns

ZodBoolean


spa

• spa: (data: unknown, params?: InexactPartial<ParseParams>) => Promise<SafeParseReturnType<boolean, boolean>>

Alias of safeParseAsync

Type declaration

▸ (data, params?): Promise<SafeParseReturnType<boolean, boolean>>

Parameters
NameType
dataunknown
params?InexactPartial<ParseParams>
Returns

Promise<SafeParseReturnType<boolean, boolean>>

Inherited from

ZodType.spa


~standard

• ~standard: Props<boolean, boolean>

Inherited from

ZodType.~standard

Accessors

description

• get description(): undefined | string

Returns

undefined | string

Inherited from

ZodType.description

Methods

_getOrReturnCtx

▸ _getOrReturnCtx(input, ctx?): ParseContext

Parameters

NameType
inputParseInput
ctx?ParseContext

Returns

ParseContext

Inherited from

ZodType._getOrReturnCtx


_getType

▸ _getType(input): string

Parameters

NameType
inputParseInput

Returns

string

Inherited from

ZodType._getType


_parse

▸ _parse(input): ParseReturnType<boolean>

Parameters

NameType
inputParseInput

Returns

ParseReturnType<boolean>

Overrides

ZodType._parse


_parseAsync

▸ _parseAsync(input): AsyncParseReturnType<boolean>

Parameters

NameType
inputParseInput

Returns

AsyncParseReturnType<boolean>

Inherited from

ZodType._parseAsync


_parseSync

▸ _parseSync(input): SyncParseReturnType<boolean>

Parameters

NameType
inputParseInput

Returns

SyncParseReturnType<boolean>

Inherited from

ZodType._parseSync


_processInputParams

▸ _processInputParams(input): Object

Parameters

NameType
inputParseInput

Returns

Object

NameType
ctxParseContext
statusParseStatus

Inherited from

ZodType._processInputParams


_refinement

▸ _refinement(refinement): ZodEffects<ZodBoolean, boolean, boolean>

Parameters

NameType
refinement(arg: boolean, ctx: RefinementCtx) => any

Returns

ZodEffects<ZodBoolean, boolean, boolean>

Inherited from

ZodType._refinement


and

▸ and<T>(incoming): ZodIntersection<ZodBoolean, T>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
incomingT

Returns

ZodIntersection<ZodBoolean, T>

Inherited from

ZodType.and


array

▸ array(): ZodArray<ZodBoolean, "many">

Returns

ZodArray<ZodBoolean, "many">

Inherited from

ZodType.array


brand

▸ brand<B>(brand?): ZodBranded<ZodBoolean, B>

Type parameters

NameType
Bextends string | number | symbol

Parameters

NameType
brand?B

Returns

ZodBranded<ZodBoolean, B>

Inherited from

ZodType.brand


catch

▸ catch(def): ZodCatch<ZodBoolean>

Parameters

NameType
defboolean

Returns

ZodCatch<ZodBoolean>

Inherited from

ZodType.catch

▸ catch(def): ZodCatch<ZodBoolean>

Parameters

NameType
def(ctx: { error: ZodError<any> ; input: boolean }) => boolean

Returns

ZodCatch<ZodBoolean>

Inherited from

ZodType.catch


default

▸ default(def): ZodDefault<ZodBoolean>

Parameters

NameType
defboolean

Returns

ZodDefault<ZodBoolean>

Inherited from

ZodType.default

▸ default(def): ZodDefault<ZodBoolean>

Parameters

NameType
def() => boolean

Returns

ZodDefault<ZodBoolean>

Inherited from

ZodType.default


describe

▸ describe(description): this

Parameters

NameType
descriptionstring

Returns

this

Inherited from

ZodType.describe


isNullable

▸ isNullable(): boolean

Returns

boolean

Inherited from

ZodType.isNullable


isOptional

▸ isOptional(): boolean

Returns

boolean

Inherited from

ZodType.isOptional


nullable

▸ nullable(): ZodNullable<ZodBoolean>

Returns

ZodNullable<ZodBoolean>

Inherited from

ZodType.nullable


nullish

▸ nullish(): ZodOptional<ZodNullable<ZodBoolean>>

Returns

ZodOptional<ZodNullable<ZodBoolean>>

Inherited from

ZodType.nullish


optional

▸ optional(): ZodOptional<ZodBoolean>

Returns

ZodOptional<ZodBoolean>

Inherited from

ZodType.optional


or

▸ or<T>(option): ZodUnion<[ZodBoolean, T]>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
optionT

Returns

ZodUnion<[ZodBoolean, T]>

Inherited from

ZodType.or


parse

▸ parse(data, params?): boolean

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

boolean

Inherited from

ZodType.parse


parseAsync

▸ parseAsync(data, params?): Promise<boolean>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

Promise<boolean>

Inherited from

ZodType.parseAsync


pipe

▸ pipe<T>(target): ZodPipeline<ZodBoolean, T>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
targetT

Returns

ZodPipeline<ZodBoolean, T>

Inherited from

ZodType.pipe


promise

▸ promise(): ZodPromise<ZodBoolean>

Returns

ZodPromise<ZodBoolean>

Inherited from

ZodType.promise


readonly

▸ readonly(): ZodReadonly<ZodBoolean>

Returns

ZodReadonly<ZodBoolean>

Inherited from

ZodType.readonly


refine

▸ refine<RefinedOutput>(check, message?): ZodEffects<ZodBoolean, RefinedOutput, boolean>

Type parameters

NameType
RefinedOutputextends boolean

Parameters

NameType
check(arg: boolean) => arg is RefinedOutput
message?string | Partial<Omit<ZodCustomIssue, "code">> | (arg: boolean) => Partial<Omit<ZodCustomIssue, "code">>

Returns

ZodEffects<ZodBoolean, RefinedOutput, boolean>

Inherited from

ZodType.refine

▸ refine(check, message?): ZodEffects<ZodBoolean, boolean, boolean>

Parameters

NameType
check(arg: boolean) => unknown
message?string | Partial<Omit<ZodCustomIssue, "code">> | (arg: boolean) => Partial<Omit<ZodCustomIssue, "code">>

Returns

ZodEffects<ZodBoolean, boolean, boolean>

Inherited from

ZodType.refine


refinement

▸ refinement<RefinedOutput>(check, refinementData): ZodEffects<ZodBoolean, RefinedOutput, boolean>

Type parameters

NameType
RefinedOutputextends boolean

Parameters

NameType
check(arg: boolean) => arg is RefinedOutput
refinementDataIssueData | (arg: boolean, ctx: RefinementCtx) => IssueData

Returns

ZodEffects<ZodBoolean, RefinedOutput, boolean>

Inherited from

ZodType.refinement

▸ refinement(check, refinementData): ZodEffects<ZodBoolean, boolean, boolean>

Parameters

NameType
check(arg: boolean) => boolean
refinementDataIssueData | (arg: boolean, ctx: RefinementCtx) => IssueData

Returns

ZodEffects<ZodBoolean, boolean, boolean>

Inherited from

ZodType.refinement


safeParse

▸ safeParse(data, params?): SafeParseReturnType<boolean, boolean>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

SafeParseReturnType<boolean, boolean>

Inherited from

ZodType.safeParse


safeParseAsync

▸ safeParseAsync(data, params?): Promise<SafeParseReturnType<boolean, boolean>>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

Promise<SafeParseReturnType<boolean, boolean>>

Inherited from

ZodType.safeParseAsync


superRefine

▸ superRefine<RefinedOutput>(refinement): ZodEffects<ZodBoolean, RefinedOutput, boolean>

Type parameters

NameType
RefinedOutputextends boolean

Parameters

NameType
refinement(arg: boolean, ctx: RefinementCtx) => arg is RefinedOutput

Returns

ZodEffects<ZodBoolean, RefinedOutput, boolean>

Inherited from

ZodType.superRefine

▸ superRefine(refinement): ZodEffects<ZodBoolean, boolean, boolean>

Parameters

NameType
refinement(arg: boolean, ctx: RefinementCtx) => void

Returns

ZodEffects<ZodBoolean, boolean, boolean>

Inherited from

ZodType.superRefine

▸ superRefine(refinement): ZodEffects<ZodBoolean, boolean, boolean>

Parameters

NameType
refinement(arg: boolean, ctx: RefinementCtx) => Promise<void>

Returns

ZodEffects<ZodBoolean, boolean, boolean>

Inherited from

ZodType.superRefine


transform

▸ transform<NewOut>(transform): ZodEffects<ZodBoolean, NewOut, boolean>

Type parameters

Name
NewOut

Parameters

NameType
transform(arg: boolean, ctx: RefinementCtx) => NewOut | Promise<NewOut>

Returns

ZodEffects<ZodBoolean, NewOut, boolean>

Inherited from

ZodType.transform


~validate

▸ ~validate(data): Result<boolean> | Promise<Result<boolean>>

Parameters

NameType
dataunknown

Returns

Result<boolean> | Promise<Result<boolean>>

Inherited from

ZodType.~validate