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