title: Core.z. Zod Set

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

Class: ZodSet<Value>

Core.z.ZodSet

Type parameters

NameType
Valueextends ZodTypeAny = ZodTypeAny

Hierarchy

  • ZodType<Set<Value["_output"]>, ZodSetDef<Value>, Set<Value["_input"]>>

    ZodSet

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ZodSet<Value>(def): ZodSet<Value>

Type parameters

NameType
Valueextends ZodTypeAny = ZodTypeAny

Parameters

NameType
defZodSetDef<Value>

Returns

ZodSet<Value>

Inherited from

ZodType.constructor

Properties

_def

Readonly _def: ZodSetDef<Value>

Inherited from

ZodType._def


_input

Readonly _input: Set<Value["_input"]>

Inherited from

ZodType._input


_output

Readonly _output: Set<Value["_output"]>

Inherited from

ZodType._output


_type

Readonly _type: Set<Value["_output"]>

Inherited from

ZodType._type


create

Static create: <ValueSchema>(valueType: ValueSchema, params?: RawCreateParams) => ZodSet<ValueSchema>

Type declaration

▸ <ValueSchema>(valueType, params?): ZodSet<ValueSchema>

Type parameters
NameType
ValueSchemaextends ZodTypeAny = ZodTypeAny
Parameters
NameType
valueTypeValueSchema
params?RawCreateParams
Returns

ZodSet<ValueSchema>


spa

spa: (data: unknown, params?: InexactPartial<ParseParams>) => Promise<SafeParseReturnType<Set<Value["_input"]>, Set<Value["_output"]>>>

Alias of safeParseAsync

Type declaration

▸ (data, params?): Promise<SafeParseReturnType<Set<Value["_input"]>, Set<Value["_output"]>>>

Parameters
NameType
dataunknown
params?InexactPartial<ParseParams>
Returns

Promise<SafeParseReturnType<Set<Value["_input"]>, Set<Value["_output"]>>>

Inherited from

ZodType.spa


~standard

~standard: Props<Set<Value["_input"]>, Set<Value["_output"]>>

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<Set<Value["_output"]>>

Parameters

NameType
inputParseInput

Returns

ParseReturnType<Set<Value["_output"]>>

Overrides

ZodType._parse


_parseAsync

_parseAsync(input): AsyncParseReturnType<Set<Value["_output"]>>

Parameters

NameType
inputParseInput

Returns

AsyncParseReturnType<Set<Value["_output"]>>

Inherited from

ZodType._parseAsync


_parseSync

_parseSync(input): SyncParseReturnType<Set<Value["_output"]>>

Parameters

NameType
inputParseInput

Returns

SyncParseReturnType<Set<Value["_output"]>>

Inherited from

ZodType._parseSync


_processInputParams

_processInputParams(input): Object

Parameters

NameType
inputParseInput

Returns

Object

NameType
ctxParseContext
statusParseStatus

Inherited from

ZodType._processInputParams


_refinement

_refinement(refinement): ZodEffects<ZodSet<Value>, Set<Value["_output"]>, Set<Value["_input"]>>

Parameters

NameType
refinement(arg: Set<Value["_output"]>, ctx: RefinementCtx) => any

Returns

ZodEffects<ZodSet<Value>, Set<Value["_output"]>, Set<Value["_input"]>>

Inherited from

ZodType._refinement


and

and<T>(incoming): ZodIntersection<ZodSet<Value>, T>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
incomingT

Returns

ZodIntersection<ZodSet<Value>, T>

Inherited from

ZodType.and


array

array(): ZodArray<ZodSet<Value>, "many">

Returns

ZodArray<ZodSet<Value>, "many">

Inherited from

ZodType.array


brand

brand<B>(brand?): ZodBranded<ZodSet<Value>, B>

Type parameters

NameType
Bextends string | number | symbol

Parameters

NameType
brand?B

Returns

ZodBranded<ZodSet<Value>, B>

Inherited from

ZodType.brand


catch

catch(def): ZodCatch<ZodSet<Value>>

Parameters

NameType
defSet<Value["_output"]>

Returns

ZodCatch<ZodSet<Value>>

Inherited from

ZodType.catch

catch(def): ZodCatch<ZodSet<Value>>

Parameters

NameType
def(ctx: { error: ZodError<any> ; input: Set<Value["_input"]> }) => Set<Value["_output"]>

Returns

ZodCatch<ZodSet<Value>>

Inherited from

ZodType.catch


default

default(def): ZodDefault<ZodSet<Value>>

Parameters

NameType
defSet<Value["_input"]>

Returns

ZodDefault<ZodSet<Value>>

Inherited from

ZodType.default

default(def): ZodDefault<ZodSet<Value>>

Parameters

NameType
def() => Set<Value["_input"]>

Returns

ZodDefault<ZodSet<Value>>

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


max

max(maxSize, message?): this

Parameters

NameType
maxSizenumber
message?ErrMessage

Returns

this


min

min(minSize, message?): this

Parameters

NameType
minSizenumber
message?ErrMessage

Returns

this


nonempty

nonempty(message?): ZodSet<Value>

Parameters

NameType
message?ErrMessage

Returns

ZodSet<Value>


nullable

nullable(): ZodNullable<ZodSet<Value>>

Returns

ZodNullable<ZodSet<Value>>

Inherited from

ZodType.nullable


nullish

nullish(): ZodOptional<ZodNullable<ZodSet<Value>>>

Returns

ZodOptional<ZodNullable<ZodSet<Value>>>

Inherited from

ZodType.nullish


optional

optional(): ZodOptional<ZodSet<Value>>

Returns

ZodOptional<ZodSet<Value>>

Inherited from

ZodType.optional


or

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

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
optionT

Returns

ZodUnion<[ZodSet<Value>, T]>

Inherited from

ZodType.or


parse

parse(data, params?): Set<Value["_output"]>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

Set<Value["_output"]>

Inherited from

ZodType.parse


parseAsync

parseAsync(data, params?): Promise<Set<Value["_output"]>>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

Promise<Set<Value["_output"]>>

Inherited from

ZodType.parseAsync


pipe

pipe<T>(target): ZodPipeline<ZodSet<Value>, T>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
targetT

Returns

ZodPipeline<ZodSet<Value>, T>

Inherited from

ZodType.pipe


promise

promise(): ZodPromise<ZodSet<Value>>

Returns

ZodPromise<ZodSet<Value>>

Inherited from

ZodType.promise


readonly

readonly(): ZodReadonly<ZodSet<Value>>

Returns

ZodReadonly<ZodSet<Value>>

Inherited from

ZodType.readonly


refine

refine<RefinedOutput>(check, message?): ZodEffects<ZodSet<Value>, RefinedOutput, Set<Value["_input"]>>

Type parameters

NameType
RefinedOutputextends Set<Value["_output"]>

Parameters

NameType
check(arg: Set<Value["_output"]>) => arg is RefinedOutput
message?string | Partial<Omit<ZodCustomIssue, "code">> | (arg: Set<Value["_output"]>) => Partial<Omit<ZodCustomIssue, "code">>

Returns

ZodEffects<ZodSet<Value>, RefinedOutput, Set<Value["_input"]>>

Inherited from

ZodType.refine

refine(check, message?): ZodEffects<ZodSet<Value>, Set<Value["_output"]>, Set<Value["_input"]>>

Parameters

NameType
check(arg: Set<Value["_output"]>) => unknown
message?string | Partial<Omit<ZodCustomIssue, "code">> | (arg: Set<Value["_output"]>) => Partial<Omit<ZodCustomIssue, "code">>

Returns

ZodEffects<ZodSet<Value>, Set<Value["_output"]>, Set<Value["_input"]>>

Inherited from

ZodType.refine


refinement

refinement<RefinedOutput>(check, refinementData): ZodEffects<ZodSet<Value>, RefinedOutput, Set<Value["_input"]>>

Type parameters

NameType
RefinedOutputextends Set<Value["_output"]>

Parameters

NameType
check(arg: Set<Value["_output"]>) => arg is RefinedOutput
refinementDataIssueData | (arg: Set<Value["_output"]>, ctx: RefinementCtx) => IssueData

Returns

ZodEffects<ZodSet<Value>, RefinedOutput, Set<Value["_input"]>>

Inherited from

ZodType.refinement

refinement(check, refinementData): ZodEffects<ZodSet<Value>, Set<Value["_output"]>, Set<Value["_input"]>>

Parameters

NameType
check(arg: Set<Value["_output"]>) => boolean
refinementDataIssueData | (arg: Set<Value["_output"]>, ctx: RefinementCtx) => IssueData

Returns

ZodEffects<ZodSet<Value>, Set<Value["_output"]>, Set<Value["_input"]>>

Inherited from

ZodType.refinement


safeParse

safeParse(data, params?): SafeParseReturnType<Set<Value["_input"]>, Set<Value["_output"]>>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

SafeParseReturnType<Set<Value["_input"]>, Set<Value["_output"]>>

Inherited from

ZodType.safeParse


safeParseAsync

safeParseAsync(data, params?): Promise<SafeParseReturnType<Set<Value["_input"]>, Set<Value["_output"]>>>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

Promise<SafeParseReturnType<Set<Value["_input"]>, Set<Value["_output"]>>>

Inherited from

ZodType.safeParseAsync


size

size(size, message?): this

Parameters

NameType
sizenumber
message?ErrMessage

Returns

this


superRefine

superRefine<RefinedOutput>(refinement): ZodEffects<ZodSet<Value>, RefinedOutput, Set<Value["_input"]>>

Type parameters

NameType
RefinedOutputextends Set<Value["_output"]>

Parameters

NameType
refinement(arg: Set<Value["_output"]>, ctx: RefinementCtx) => arg is RefinedOutput

Returns

ZodEffects<ZodSet<Value>, RefinedOutput, Set<Value["_input"]>>

Inherited from

ZodType.superRefine

superRefine(refinement): ZodEffects<ZodSet<Value>, Set<Value["_output"]>, Set<Value["_input"]>>

Parameters

NameType
refinement(arg: Set<Value["_output"]>, ctx: RefinementCtx) => void

Returns

ZodEffects<ZodSet<Value>, Set<Value["_output"]>, Set<Value["_input"]>>

Inherited from

ZodType.superRefine

superRefine(refinement): ZodEffects<ZodSet<Value>, Set<Value["_output"]>, Set<Value["_input"]>>

Parameters

NameType
refinement(arg: Set<Value["_output"]>, ctx: RefinementCtx) => Promise<void>

Returns

ZodEffects<ZodSet<Value>, Set<Value["_output"]>, Set<Value["_input"]>>

Inherited from

ZodType.superRefine


transform

transform<NewOut>(transform): ZodEffects<ZodSet<Value>, NewOut, Set<Value["_input"]>>

Type parameters

Name
NewOut

Parameters

NameType
transform(arg: Set<Value["_output"]>, ctx: RefinementCtx) => NewOut | Promise<NewOut>

Returns

ZodEffects<ZodSet<Value>, NewOut, Set<Value["_input"]>>

Inherited from

ZodType.transform


~validate

~validate(data): Result<Set<Value["_output"]>> | Promise<Result<Set<Value["_output"]>>>

Parameters

NameType
dataunknown

Returns

Result<Set<Value["_output"]>> | Promise<Result<Set<Value["_output"]>>>

Inherited from

ZodType.~validate