title: Core.z. Zod Set
A2A Node SDK - v0.1.0 / Modules / Core / z / ZodSet
Class: ZodSet<Value>
Type parameters
Name | Type |
---|---|
Value | extends ZodTypeAny = ZodTypeAny |
Hierarchy
Table of contents
Constructors
Properties
Accessors
Methods
- _getOrReturnCtx
- _getType
- _parse
- _parseAsync
- _parseSync
- _processInputParams
- _refinement
- and
- array
- brand
- catch
- default
- describe
- isNullable
- isOptional
- max
- min
- nonempty
- nullable
- nullish
- optional
- or
- parse
- parseAsync
- pipe
- promise
- readonly
- refine
- refinement
- safeParse
- safeParseAsync
- size
- superRefine
- transform
- ~validate
Constructors
constructor
• new ZodSet<Value
>(def
): ZodSet
<Value
>
Type parameters
Name | Type |
---|---|
Value | extends ZodTypeAny = ZodTypeAny |
Parameters
Name | Type |
---|---|
def | ZodSetDef <Value > |
Returns
ZodSet
<Value
>
Inherited from
Properties
_def
• Readonly
_def: ZodSetDef
<Value
>
Inherited from
_input
• Readonly
_input: Set
<Value
["_input"
]>
Inherited from
_output
• Readonly
_output: Set
<Value
["_output"
]>
Inherited from
_type
• Readonly
_type: Set
<Value
["_output"
]>
Inherited from
create
▪ Static
create: <ValueSchema>(valueType
: ValueSchema
, params?
: RawCreateParams
) => ZodSet
<ValueSchema
>
Type declaration
▸ <ValueSchema
>(valueType
, params?
): ZodSet
<ValueSchema
>
Type parameters
Name | Type |
---|---|
ValueSchema | extends ZodTypeAny = ZodTypeAny |
Parameters
Name | Type |
---|---|
valueType | ValueSchema |
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
Name | Type |
---|---|
data | unknown |
params? | InexactPartial <ParseParams > |
Returns
Promise
<SafeParseReturnType
<Set
<Value
["_input"
]>, Set
<Value
["_output"
]>>>
Inherited from
~standard
• ~standard: Props
<Set
<Value
["_input"
]>, Set
<Value
["_output"
]>>
Inherited from
Accessors
description
• get
description(): undefined
| string
Returns
undefined
| string
Inherited from
ZodType.description
Methods
_getOrReturnCtx
▸ _getOrReturnCtx(input
, ctx?
): ParseContext
Parameters
Name | Type |
---|---|
input | ParseInput |
ctx? | ParseContext |
Returns
Inherited from
_getType
▸ _getType(input
): string
Parameters
Name | Type |
---|---|
input | ParseInput |
Returns
string
Inherited from
_parse
▸ _parse(input
): ParseReturnType
<Set
<Value
["_output"
]>>
Parameters
Name | Type |
---|---|
input | ParseInput |
Returns
ParseReturnType
<Set
<Value
["_output"
]>>
Overrides
_parseAsync
▸ _parseAsync(input
): AsyncParseReturnType
<Set
<Value
["_output"
]>>
Parameters
Name | Type |
---|---|
input | ParseInput |
Returns
AsyncParseReturnType
<Set
<Value
["_output"
]>>
Inherited from
_parseSync
▸ _parseSync(input
): SyncParseReturnType
<Set
<Value
["_output"
]>>
Parameters
Name | Type |
---|---|
input | ParseInput |
Returns
SyncParseReturnType
<Set
<Value
["_output"
]>>
Inherited from
_processInputParams
▸ _processInputParams(input
): Object
Parameters
Name | Type |
---|---|
input | ParseInput |
Returns
Object
Name | Type |
---|---|
ctx | ParseContext |
status | ParseStatus |
Inherited from
_refinement
▸ _refinement(refinement
): ZodEffects
<ZodSet
<Value
>, Set
<Value
["_output"
]>, Set
<Value
["_input"
]>>
Parameters
Name | Type |
---|---|
refinement | (arg : Set <Value ["_output" ]>, ctx : RefinementCtx ) => any |
Returns
ZodEffects
<ZodSet
<Value
>, Set
<Value
["_output"
]>, Set
<Value
["_input"
]>>
Inherited from
and
▸ and<T
>(incoming
): ZodIntersection
<ZodSet
<Value
>, T
>
Type parameters
Name | Type |
---|---|
T | extends ZodTypeAny |
Parameters
Name | Type |
---|---|
incoming | T |
Returns
ZodIntersection
<ZodSet
<Value
>, T
>
Inherited from
array
▸ array(): ZodArray
<ZodSet
<Value
>, "many"
>
Returns
ZodArray
<ZodSet
<Value
>, "many"
>
Inherited from
brand
▸ brand<B
>(brand?
): ZodBranded
<ZodSet
<Value
>, B
>
Type parameters
Name | Type |
---|---|
B | extends string | number | symbol |
Parameters
Name | Type |
---|---|
brand? | B |
Returns
ZodBranded
<ZodSet
<Value
>, B
>
Inherited from
catch
▸ catch(def
): ZodCatch
<ZodSet
<Value
>>
Parameters
Name | Type |
---|---|
def | Set <Value ["_output" ]> |
Returns
Inherited from
▸ catch(def
): ZodCatch
<ZodSet
<Value
>>
Parameters
Name | Type |
---|---|
def | (ctx : { error : ZodError <any > ; input : Set <Value ["_input" ]> }) => Set <Value ["_output" ]> |
Returns
Inherited from
default
▸ default(def
): ZodDefault
<ZodSet
<Value
>>
Parameters
Name | Type |
---|---|
def | Set <Value ["_input" ]> |
Returns
ZodDefault
<ZodSet
<Value
>>
Inherited from
▸ default(def
): ZodDefault
<ZodSet
<Value
>>
Parameters
Name | Type |
---|---|
def | () => Set <Value ["_input" ]> |
Returns
ZodDefault
<ZodSet
<Value
>>
Inherited from
describe
▸ describe(description
): this
Parameters
Name | Type |
---|---|
description | string |
Returns
this
Inherited from
isNullable
▸ isNullable(): boolean
Returns
boolean
Inherited from
isOptional
▸ isOptional(): boolean
Returns
boolean
Inherited from
max
▸ max(maxSize
, message?
): this
Parameters
Name | Type |
---|---|
maxSize | number |
message? | ErrMessage |
Returns
this
min
▸ min(minSize
, message?
): this
Parameters
Name | Type |
---|---|
minSize | number |
message? | ErrMessage |
Returns
this
nonempty
▸ nonempty(message?
): ZodSet
<Value
>
Parameters
Name | Type |
---|---|
message? | ErrMessage |
Returns
ZodSet
<Value
>
nullable
▸ nullable(): ZodNullable
<ZodSet
<Value
>>
Returns
ZodNullable
<ZodSet
<Value
>>
Inherited from
nullish
▸ nullish(): ZodOptional
<ZodNullable
<ZodSet
<Value
>>>
Returns
ZodOptional
<ZodNullable
<ZodSet
<Value
>>>
Inherited from
optional
▸ optional(): ZodOptional
<ZodSet
<Value
>>
Returns
ZodOptional
<ZodSet
<Value
>>
Inherited from
or
▸ or<T
>(option
): ZodUnion
<[ZodSet
<Value
>, T
]>
Type parameters
Name | Type |
---|---|
T | extends ZodTypeAny |
Parameters
Name | Type |
---|---|
option | T |
Returns
Inherited from
parse
▸ parse(data
, params?
): Set
<Value
["_output"
]>
Parameters
Name | Type |
---|---|
data | unknown |
params? | InexactPartial <ParseParams > |
Returns
Set
<Value
["_output"
]>
Inherited from
parseAsync
▸ parseAsync(data
, params?
): Promise
<Set
<Value
["_output"
]>>
Parameters
Name | Type |
---|---|
data | unknown |
params? | InexactPartial <ParseParams > |
Returns
Promise
<Set
<Value
["_output"
]>>
Inherited from
pipe
▸ pipe<T
>(target
): ZodPipeline
<ZodSet
<Value
>, T
>
Type parameters
Name | Type |
---|---|
T | extends ZodTypeAny |
Parameters
Name | Type |
---|---|
target | T |
Returns
ZodPipeline
<ZodSet
<Value
>, T
>
Inherited from
promise
▸ promise(): ZodPromise
<ZodSet
<Value
>>
Returns
ZodPromise
<ZodSet
<Value
>>
Inherited from
readonly
▸ readonly(): ZodReadonly
<ZodSet
<Value
>>
Returns
ZodReadonly
<ZodSet
<Value
>>
Inherited from
refine
▸ refine<RefinedOutput
>(check
, message?
): ZodEffects
<ZodSet
<Value
>, RefinedOutput
, Set
<Value
["_input"
]>>
Type parameters
Name | Type |
---|---|
RefinedOutput | extends Set <Value ["_output" ]> |
Parameters
Name | Type |
---|---|
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
▸ refine(check
, message?
): ZodEffects
<ZodSet
<Value
>, Set
<Value
["_output"
]>, Set
<Value
["_input"
]>>
Parameters
Name | Type |
---|---|
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
refinement
▸ refinement<RefinedOutput
>(check
, refinementData
): ZodEffects
<ZodSet
<Value
>, RefinedOutput
, Set
<Value
["_input"
]>>
Type parameters
Name | Type |
---|---|
RefinedOutput | extends Set <Value ["_output" ]> |
Parameters
Name | Type |
---|---|
check | (arg : Set <Value ["_output" ]>) => arg is RefinedOutput |
refinementData | IssueData | (arg : Set <Value ["_output" ]>, ctx : RefinementCtx ) => IssueData |
Returns
ZodEffects
<ZodSet
<Value
>, RefinedOutput
, Set
<Value
["_input"
]>>
Inherited from
▸ refinement(check
, refinementData
): ZodEffects
<ZodSet
<Value
>, Set
<Value
["_output"
]>, Set
<Value
["_input"
]>>
Parameters
Name | Type |
---|---|
check | (arg : Set <Value ["_output" ]>) => boolean |
refinementData | IssueData | (arg : Set <Value ["_output" ]>, ctx : RefinementCtx ) => IssueData |
Returns
ZodEffects
<ZodSet
<Value
>, Set
<Value
["_output"
]>, Set
<Value
["_input"
]>>
Inherited from
safeParse
▸ safeParse(data
, params?
): SafeParseReturnType
<Set
<Value
["_input"
]>, Set
<Value
["_output"
]>>
Parameters
Name | Type |
---|---|
data | unknown |
params? | InexactPartial <ParseParams > |
Returns
SafeParseReturnType
<Set
<Value
["_input"
]>, Set
<Value
["_output"
]>>
Inherited from
safeParseAsync
▸ safeParseAsync(data
, params?
): Promise
<SafeParseReturnType
<Set
<Value
["_input"
]>, Set
<Value
["_output"
]>>>
Parameters
Name | Type |
---|---|
data | unknown |
params? | InexactPartial <ParseParams > |
Returns
Promise
<SafeParseReturnType
<Set
<Value
["_input"
]>, Set
<Value
["_output"
]>>>
Inherited from
size
▸ size(size
, message?
): this
Parameters
Name | Type |
---|---|
size | number |
message? | ErrMessage |
Returns
this
superRefine
▸ superRefine<RefinedOutput
>(refinement
): ZodEffects
<ZodSet
<Value
>, RefinedOutput
, Set
<Value
["_input"
]>>
Type parameters
Name | Type |
---|---|
RefinedOutput | extends Set <Value ["_output" ]> |
Parameters
Name | Type |
---|---|
refinement | (arg : Set <Value ["_output" ]>, ctx : RefinementCtx ) => arg is RefinedOutput |
Returns
ZodEffects
<ZodSet
<Value
>, RefinedOutput
, Set
<Value
["_input"
]>>
Inherited from
▸ superRefine(refinement
): ZodEffects
<ZodSet
<Value
>, Set
<Value
["_output"
]>, Set
<Value
["_input"
]>>
Parameters
Name | Type |
---|---|
refinement | (arg : Set <Value ["_output" ]>, ctx : RefinementCtx ) => void |
Returns
ZodEffects
<ZodSet
<Value
>, Set
<Value
["_output"
]>, Set
<Value
["_input"
]>>
Inherited from
▸ superRefine(refinement
): ZodEffects
<ZodSet
<Value
>, Set
<Value
["_output"
]>, Set
<Value
["_input"
]>>
Parameters
Name | Type |
---|---|
refinement | (arg : Set <Value ["_output" ]>, ctx : RefinementCtx ) => Promise <void > |
Returns
ZodEffects
<ZodSet
<Value
>, Set
<Value
["_output"
]>, Set
<Value
["_input"
]>>
Inherited from
transform
▸ transform<NewOut
>(transform
): ZodEffects
<ZodSet
<Value
>, NewOut
, Set
<Value
["_input"
]>>
Type parameters
Name |
---|
NewOut |
Parameters
Name | Type |
---|---|
transform | (arg : Set <Value ["_output" ]>, ctx : RefinementCtx ) => NewOut | Promise <NewOut > |
Returns
ZodEffects
<ZodSet
<Value
>, NewOut
, Set
<Value
["_input"
]>>
Inherited from
~validate
▸ ~validate(data
): Result
<Set
<Value
["_output"
]>> | Promise
<Result
<Set
<Value
["_output"
]>>>
Parameters
Name | Type |
---|---|
data | unknown |
Returns
Result
<Set
<Value
["_output"
]>> | Promise
<Result
<Set
<Value
["_output"
]>>>