Skip to main content

Interface: ZodCoercedBoolean<T>

Defined in: packages/agentos/node_modules/zod/v4/classic/coerce.d.cts:9

Extends​

Type Parameters​

T​

T = unknown

Properties​

_def​

_def: $ZodBooleanDef

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:11

Deprecated​

Use .def instead.

Inherited from​

_ZodBoolean._def


_input​

_input: T

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:15

Deprecated​

Use z.input<typeof schema> instead.

Inherited from​

_ZodBoolean._input


_output​

_output: boolean

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:13

Deprecated​

Use z.output<typeof schema> instead.

Inherited from​

_ZodBoolean._output


_zod​

_zod: $ZodBooleanInternals

Defined in: packages/agentos/node_modules/zod/v4/core/schemas.d.cts:111

Inherited from​

_ZodBoolean._zod


~standard​

~standard: ZodStandardSchemaWithJSON<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:16

Inherited from​

_ZodBoolean.~standard


def​

def: $ZodBooleanDef

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:8

Inherited from​

_ZodBoolean.def


description?​

optional description: string

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:63

Inherited from​

_ZodBoolean.description


spa()​

spa: (data, params?) => Promise<ZodSafeParseResult<boolean>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:30

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

Promise<ZodSafeParseResult<boolean>>

Inherited from​

_ZodBoolean.spa


type​

type: "boolean"

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:9

Inherited from​

_ZodBoolean.type

Methods​

and()​

and<T>(incoming): ZodIntersection<ZodCoercedBoolean<T>, T>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:55

Type Parameters​

T​

T extends SomeType

Parameters​

incoming​

T

Returns​

ZodIntersection<ZodCoercedBoolean<T>, T>

Inherited from​

_ZodBoolean.and


apply()​

apply<T, TArgs>(fn, ...args): T

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:85

Type Parameters​

T​

T

TArgs​

TArgs extends unknown[] = []

Parameters​

fn​

(schema, ...args) => T

args​

...TArgs

Returns​

T

Inherited from​

_ZodBoolean.apply


array()​

array(): ZodArray<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:53

Returns​

ZodArray<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.array


brand()​

brand<T, Dir>(value?): PropertyKey extends T ? ZodCoercedBoolean<T> : $ZodBranded<ZodCoercedBoolean<T>, T, Dir>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:25

Type Parameters​

T​

T extends PropertyKey = PropertyKey

Dir​

Dir extends "inout" | "in" | "out" = "out"

Parameters​

value?​

T

Returns​

PropertyKey extends T ? ZodCoercedBoolean<T> : $ZodBranded<ZodCoercedBoolean<T>, T, Dir>

Inherited from​

_ZodBoolean.brand


catch()​

Call Signature​

catch(def): ZodCatch<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:57

Parameters​
def​

boolean

Returns​

ZodCatch<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.catch

Call Signature​

catch(def): ZodCatch<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:58

Parameters​
def​

(ctx) => boolean

Returns​

ZodCatch<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.catch


check()​

check(...checks): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:19

Parameters​

checks​

...(CheckFn<boolean> | $ZodCheck<boolean>)[]

Returns​

this

Inherited from​

_ZodBoolean.check


clone()​

clone(def?, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:21

Parameters​

def?​

$ZodBooleanDef

params?​
parent​

boolean

Returns​

this

Inherited from​

_ZodBoolean.clone


decode()​

decode(data, params?): boolean

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:34

Parameters​

data​

T

params?​

ParseContext<$ZodIssue>

Returns​

boolean

Inherited from​

_ZodBoolean.decode


decodeAsync()​

decodeAsync(data, params?): Promise<boolean>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:36

Parameters​

data​

T

params?​

ParseContext<$ZodIssue>

Returns​

Promise<boolean>

Inherited from​

_ZodBoolean.decodeAsync


default()​

Call Signature​

default(def): ZodDefault<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:49

Parameters​
def​

boolean

Returns​

ZodDefault<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.default

Call Signature​

default(def): ZodDefault<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:50

Parameters​
def​

() => boolean

Returns​

ZodDefault<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.default


describe()​

describe(description): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:62

Returns a new instance that has been registered in z.globalRegistry with the specified description

Parameters​

description​

string

Returns​

this

Inherited from​

_ZodBoolean.describe


encode()​

encode(data, params?): T

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:33

Parameters​

data​

boolean

params?​

ParseContext<$ZodIssue>

Returns​

T

Inherited from​

_ZodBoolean.encode


encodeAsync()​

encodeAsync(data, params?): Promise<T>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:35

Parameters​

data​

boolean

params?​

ParseContext<$ZodIssue>

Returns​

Promise<T>

Inherited from​

_ZodBoolean.encodeAsync


exactOptional()​

exactOptional(): ZodExactOptional<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:45

Returns​

ZodExactOptional<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.exactOptional


isNullable()​

isNullable(): boolean

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:84

Returns​

boolean

Deprecated​

Try safe-parsing null (this is what isNullable does internally):

const schema = z.string().nullable();
const isNullable = schema.safeParse(null).success; // true

Inherited from​

_ZodBoolean.isNullable


isOptional()​

isOptional(): boolean

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:75

Returns​

boolean

Deprecated​

Try safe-parsing undefined (this is what isOptional does internally):

const schema = z.string().optional();
const isOptional = schema.safeParse(undefined).success; // true

Inherited from​

_ZodBoolean.isOptional


meta()​

Call Signature​

meta(): {[key: string]: unknown; deprecated?: boolean; description?: string; id?: string; title?: string; } | undefined

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:65

Returns the metadata associated with this instance in z.globalRegistry

Returns​

{[key: string]: unknown; deprecated?: boolean; description?: string; id?: string; title?: string; } | undefined

Inherited from​

_ZodBoolean.meta

Call Signature​

meta(data): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:67

Returns a new instance that has been registered in z.globalRegistry with the specified metadata

Parameters​
data​
deprecated?​

boolean

description?​

string

id?​

string

title?​

string

Returns​

this

Inherited from​

_ZodBoolean.meta


nonoptional()​

nonoptional(params?): ZodNonOptional<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:46

Parameters​

params?​

string |

{ error?: string | $ZodErrorMap<$ZodIssueInvalidType<unknown>>; message?: string; }

error?​

string | $ZodErrorMap<$ZodIssueInvalidType<unknown>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

ZodNonOptional<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.nonoptional


nullable()​

nullable(): ZodNullable<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:47

Returns​

ZodNullable<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.nullable


nullish()​

nullish(): ZodOptional<ZodNullable<ZodCoercedBoolean<T>>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:48

Returns​

ZodOptional<ZodNullable<ZodCoercedBoolean<T>>>

Inherited from​

_ZodBoolean.nullish


optional()​

optional(): ZodOptional<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:44

Returns​

ZodOptional<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.optional


or()​

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

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:54

Type Parameters​

T​

T extends SomeType

Parameters​

option​

T

Returns​

ZodUnion<[ZodCoercedBoolean<T>, T]>

Inherited from​

_ZodBoolean.or


overwrite()​

overwrite(fn): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:43

Parameters​

fn​

(x) => boolean

Returns​

this

Inherited from​

_ZodBoolean.overwrite


parse()​

parse(data, params?): boolean

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:26

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

boolean

Inherited from​

_ZodBoolean.parse


parseAsync()​

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

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:28

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

Promise<boolean>

Inherited from​

_ZodBoolean.parseAsync


pipe()​

pipe<T>(target): ZodPipe<ZodCoercedBoolean<T>, T>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:59

Type Parameters​

T​

T extends $ZodType<any, boolean, $ZodTypeInternals<any, boolean>>

Parameters​

target​

$ZodType<any, boolean, $ZodTypeInternals<any, boolean>> | T

Returns​

ZodPipe<ZodCoercedBoolean<T>, T>

Inherited from​

_ZodBoolean.pipe


prefault()​

Call Signature​

prefault(def): ZodPrefault<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:51

Parameters​
def​

() => T

Returns​

ZodPrefault<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.prefault

Call Signature​

prefault(def): ZodPrefault<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:52

Parameters​
def​

T

Returns​

ZodPrefault<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.prefault


readonly()​

readonly(): ZodReadonly<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:60

Returns​

ZodReadonly<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.readonly


refine()​

refine<Ch>(check, params?): Ch extends (arg) => arg is R ? ZodCoercedBoolean<T> & ZodType<R, T, $ZodTypeInternals<R, T>> : ZodCoercedBoolean<T>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:41

Type Parameters​

Ch​

Ch extends (arg) => unknown

Parameters​

check​

Ch

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<NonNullable<$ZodIssue>>; message?: string; params?: Record<string, any>; path?: PropertyKey[]; when?: (payload) => boolean; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<NonNullable<$ZodIssue>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

params?​

Record<string, any>

path?​

PropertyKey[]

when?​

(payload) => boolean

If provided, the check runs only when this returns true. By default, it is skipped if prior parsing produced aborting issues.

Returns​

Ch extends (arg) => arg is R ? ZodCoercedBoolean<T> & ZodType<R, T, $ZodTypeInternals<R, T>> : ZodCoercedBoolean<T>

Inherited from​

_ZodBoolean.refine


register()​

register<R>(registry, ...meta): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:24

Type Parameters​

R​

R extends $ZodRegistry<MetadataType, $ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>>

Parameters​

registry​

R

meta​

...ZodCoercedBoolean<T> extends R["_schema"] ? undefined extends R["_meta"] ? [$replace<R["_meta"], R["_schema"] & ZodCoercedBoolean<T>>?] : [$replace<R["_meta"], R["_schema"] & ZodCoercedBoolean<T>>] : ["Incompatible schema"]

Returns​

this

Inherited from​

_ZodBoolean.register


safeDecode()​

safeDecode(data, params?): ZodSafeParseResult<boolean>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:38

Parameters​

data​

T

params?​

ParseContext<$ZodIssue>

Returns​

ZodSafeParseResult<boolean>

Inherited from​

_ZodBoolean.safeDecode


safeDecodeAsync()​

safeDecodeAsync(data, params?): Promise<ZodSafeParseResult<boolean>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:40

Parameters​

data​

T

params?​

ParseContext<$ZodIssue>

Returns​

Promise<ZodSafeParseResult<boolean>>

Inherited from​

_ZodBoolean.safeDecodeAsync


safeEncode()​

safeEncode(data, params?): ZodSafeParseResult<T>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:37

Parameters​

data​

boolean

params?​

ParseContext<$ZodIssue>

Returns​

ZodSafeParseResult<T>

Inherited from​

_ZodBoolean.safeEncode


safeEncodeAsync()​

safeEncodeAsync(data, params?): Promise<ZodSafeParseResult<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:39

Parameters​

data​

boolean

params?​

ParseContext<$ZodIssue>

Returns​

Promise<ZodSafeParseResult<T>>

Inherited from​

_ZodBoolean.safeEncodeAsync


safeParse()​

safeParse(data, params?): ZodSafeParseResult<boolean>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:27

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

ZodSafeParseResult<boolean>

Inherited from​

_ZodBoolean.safeParse


safeParseAsync()​

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

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:29

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

Promise<ZodSafeParseResult<boolean>>

Inherited from​

_ZodBoolean.safeParseAsync


superRefine()​

superRefine(refinement, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:42

Parameters​

refinement​

(arg, ctx) => void | Promise<void>

params?​

$ZodSuperRefineParams

Returns​

this

Inherited from​

_ZodBoolean.superRefine


toJSONSchema()​

toJSONSchema(params?): ZodStandardJSONSchemaPayload<ZodCoercedBoolean<T>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:18

Converts this schema to a JSON Schema representation.

Parameters​

params?​

ToJSONSchemaParams

Returns​

ZodStandardJSONSchemaPayload<ZodCoercedBoolean<T>>

Inherited from​

_ZodBoolean.toJSONSchema


transform()​

transform<NewOut>(transform): ZodPipe<ZodCoercedBoolean<T>, ZodTransform<Awaited<NewOut>, boolean>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:56

Type Parameters​

NewOut​

NewOut

Parameters​

transform​

(arg, ctx) => NewOut | Promise<NewOut>

Returns​

ZodPipe<ZodCoercedBoolean<T>, ZodTransform<Awaited<NewOut>, boolean>>

Inherited from​

_ZodBoolean.transform


validate()​

validate(data, params?): data is T

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:31

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

data is T

Inherited from​

_ZodBoolean.validate


validateAsync()​

validateAsync(data, params?): Promise<boolean>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:32

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

Promise<boolean>

Inherited from​

_ZodBoolean.validateAsync


with()​

with(...checks): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:20

Parameters​

checks​

...(CheckFn<boolean> | $ZodCheck<boolean>)[]

Returns​

this

Inherited from​

_ZodBoolean.with