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