Interface: ZodIntersection<A, B>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:515
Extends
_ZodType<$ZodIntersectionInternals<A,B>>.$ZodIntersection<A,B>
Type Parameters
A
B
Properties
_def
_def:
$ZodIntersectionDef<A,B>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:10
Deprecated
Use .def instead.
Inherited from
_input
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:14
Deprecated
Use z.input<typeof schema> instead.
Inherited from
_output
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:12
Deprecated
Use z.output<typeof schema> instead.
Inherited from
_zod
Defined in: packages/agentos/node_modules/zod/v4/core/schemas.d.cts:93
Inherited from
~standard
~standard:
ZodStandardSchemaWithJSON<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:516
Overrides
def
def:
$ZodIntersectionDef<A,B>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:7
Inherited from
description?
optionaldescription:string
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:60
Inherited from
spa()
spa: (
data,params?) =>Promise<ZodSafeParseResult<output<A> &output<B>>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:29
Parameters
data
unknown
params?
Returns
Promise<ZodSafeParseResult<output<A> & output<B>>>
Inherited from
type
type:
"intersection"
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:8
Inherited from
Methods
and()
and<
T>(incoming):ZodIntersection<ZodIntersection<A,B>,T>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:52
Type Parameters
T
T extends SomeType
Parameters
incoming
T
Returns
ZodIntersection<ZodIntersection<A, B>, T>
Inherited from
apply()
apply<
T>(fn):T
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:82
Type Parameters
T
T
Parameters
fn
(schema) => T
Returns
T
Inherited from
array()
array():
ZodArray<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:50
Returns
ZodArray<ZodIntersection<A, B>>
Inherited from
brand()
brand<
T,Dir>(value?):PropertyKeyextendsT?ZodIntersection<A,B> :$ZodBranded<ZodIntersection<A,B>,T,Dir>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:24
Type Parameters
T
T extends PropertyKey = PropertyKey
Dir
Dir extends "inout" | "in" | "out" = "out"
Parameters
value?
T
Returns
PropertyKey extends T ? ZodIntersection<A, B> : $ZodBranded<ZodIntersection<A, B>, T, Dir>
Inherited from
catch()
Call Signature
catch(
def):ZodCatch<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:54
Parameters
def
Returns
ZodCatch<ZodIntersection<A, B>>
Inherited from
Call Signature
catch(
def):ZodCatch<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:55
Parameters
def
(ctx) => output<A> & output<B>
Returns
ZodCatch<ZodIntersection<A, B>>
Inherited from
check()
check(...
checks):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:18
Parameters
checks
...(CheckFn<output<A> & output<B>> | $ZodCheck<output<A> & output<B>>)[]
Returns
this
Inherited from
clone()
clone(
def?,params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:20
Parameters
def?
$ZodIntersectionDef<A, B>
params?
parent
boolean
Returns
this
Inherited from
decode()
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:31
Parameters
data
params?
Returns
Inherited from
decodeAsync()
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:33
Parameters
data
params?
Returns
Promise<output<A> & output<B>>
Inherited from
default()
Call Signature
default(
def):ZodDefault<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:46
Parameters
def
NoUndefined<output<A> & output<B>>
Returns
ZodDefault<ZodIntersection<A, B>>
Inherited from
Call Signature
default(
def):ZodDefault<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:47
Parameters
def
() => NoUndefined<output<A> & output<B>>
Returns
ZodDefault<ZodIntersection<A, B>>
Inherited from
describe()
describe(
description):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:59
Returns a new instance that has been registered in z.globalRegistry with the specified description
Parameters
description
string
Returns
this
Inherited from
encode()
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:30
Parameters
data
params?
Returns
Inherited from
encodeAsync()
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:32
Parameters
data
params?
Returns
Inherited from
exactOptional()
exactOptional():
ZodExactOptional<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:42
Returns
ZodExactOptional<ZodIntersection<A, B>>
Inherited from
isNullable()
isNullable():
boolean
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:81
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
isOptional()
isOptional():
boolean
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:72
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
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:62
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
Call Signature
meta(
data):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:64
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
nonoptional()
nonoptional(
params?):ZodNonOptional<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:43
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<ZodIntersection<A, B>>
Inherited from
nullable()
nullable():
ZodNullable<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:44
Returns
ZodNullable<ZodIntersection<A, B>>
Inherited from
nullish()
nullish():
ZodOptional<ZodNullable<ZodIntersection<A,B>>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:45
Returns
ZodOptional<ZodNullable<ZodIntersection<A, B>>>
Inherited from
optional()
optional():
ZodOptional<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:41
Returns
ZodOptional<ZodIntersection<A, B>>
Inherited from
or()
or<
T>(option):ZodUnion<[ZodIntersection<A,B>,T]>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:51
Type Parameters
T
T extends SomeType
Parameters
option
T
Returns
ZodUnion<[ZodIntersection<A, B>, T]>
Inherited from
overwrite()
overwrite(
fn):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:40
Parameters
fn
Returns
this
Inherited from
parse()
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:25
Parameters
data
unknown
params?
Returns
Inherited from
parseAsync()
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:27
Parameters
data
unknown
params?
Returns
Promise<output<A> & output<B>>
Inherited from
pipe()
pipe<
T>(target):ZodPipe<ZodIntersection<A,B>,T>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:56
Type Parameters
T
T extends $ZodType<any, output<A> & output<B>, $ZodTypeInternals<any, output<A> & output<B>>>
Parameters
target
T | $ZodType<any, output<A> & output<B>, $ZodTypeInternals<any, output<A> & output<B>>>
Returns
ZodPipe<ZodIntersection<A, B>, T>
Inherited from
prefault()
Call Signature
prefault(
def):ZodPrefault<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:48
Parameters
def
Returns
ZodPrefault<ZodIntersection<A, B>>
Inherited from
Call Signature
prefault(
def):ZodPrefault<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:49
Parameters
def
Returns
ZodPrefault<ZodIntersection<A, B>>
Inherited from
readonly()
readonly():
ZodReadonly<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:57
Returns
ZodReadonly<ZodIntersection<A, B>>
Inherited from
refine()
refine<
Ch>(check,params?):Chextends (arg) =>arg is R?ZodIntersection<A,B> &ZodType<R,input<A> &input<B>,$ZodTypeInternals<R,input<A> &input<B>>> :ZodIntersection<A,B>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:38
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 ? ZodIntersection<A, B> & ZodType<R, input<A> & input<B>, $ZodTypeInternals<R, input<A> & input<B>>> : ZodIntersection<A, B>
Inherited from
register()
register<
R>(registry, ...meta):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:23
Type Parameters
R
R extends $ZodRegistry<MetadataType, $ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>>
Parameters
registry
R
meta
...ZodIntersection<A, B> extends R["_schema"] ? undefined extends R["_meta"] ? [$replace<R["_meta"], R["_schema"] & ZodIntersection<A, B>>?] : [$replace<R["_meta"], R["_schema"] & ZodIntersection<A, B>>] : ["Incompatible schema"]
Returns
this
Inherited from
safeDecode()
safeDecode(
data,params?):ZodSafeParseResult<output<A> &output<B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:35
Parameters
data
params?
Returns
ZodSafeParseResult<output<A> & output<B>>
Inherited from
safeDecodeAsync()
safeDecodeAsync(
data,params?):Promise<ZodSafeParseResult<output<A> &output<B>>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:37
Parameters
data
params?
Returns
Promise<ZodSafeParseResult<output<A> & output<B>>>
Inherited from
safeEncode()
safeEncode(
data,params?):ZodSafeParseResult<input<A> &input<B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:34
Parameters
data
params?
Returns
ZodSafeParseResult<input<A> & input<B>>
Inherited from
safeEncodeAsync()
safeEncodeAsync(
data,params?):Promise<ZodSafeParseResult<input<A> &input<B>>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:36
Parameters
data
params?
Returns
Promise<ZodSafeParseResult<input<A> & input<B>>>
Inherited from
safeParse()
safeParse(
data,params?):ZodSafeParseResult<output<A> &output<B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:26
Parameters
data
unknown
params?
Returns
ZodSafeParseResult<output<A> & output<B>>
Inherited from
safeParseAsync()
safeParseAsync(
data,params?):Promise<ZodSafeParseResult<output<A> &output<B>>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:28
Parameters
data
unknown
params?
Returns
Promise<ZodSafeParseResult<output<A> & output<B>>>
Inherited from
superRefine()
superRefine(
refinement,params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:39
Parameters
refinement
(arg, ctx) => void | Promise<void>
params?
Returns
this
Inherited from
toJSONSchema()
toJSONSchema(
params?):ZodStandardJSONSchemaPayload<ZodIntersection<A,B>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:17
Converts this schema to a JSON Schema representation.
Parameters
params?
Returns
ZodStandardJSONSchemaPayload<ZodIntersection<A, B>>
Inherited from
transform()
transform<
NewOut>(transform):ZodPipe<ZodIntersection<A,B>,ZodTransform<Awaited<NewOut>,output<A> &output<B>>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:53
Type Parameters
NewOut
NewOut
Parameters
transform
(arg, ctx) => NewOut | Promise<NewOut>
Returns
ZodPipe<ZodIntersection<A, B>, ZodTransform<Awaited<NewOut>, output<A> & output<B>>>
Inherited from
with()
with(...
checks):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:19
Parameters
checks
...(CheckFn<output<A> & output<B>> | $ZodCheck<output<A> & output<B>>)[]
Returns
this