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