title: Core.z. Zod Null

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

Class: ZodNull

Core.z.ZodNull

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

• new ZodNull(def): ZodNull

Parameters

NameType
defZodNullDef

Returns

ZodNull

Inherited from

ZodType.constructor

Properties

_def

• Readonly _def: ZodNullDef

Inherited from

ZodType._def


_input

• Readonly _input: null

Inherited from

ZodType._input


_output

• Readonly _output: null

Inherited from

ZodType._output


_type

• Readonly _type: null

Inherited from

ZodType._type


create

▪ Static create: (params?: RawCreateParams) => ZodNull

Type declaration

▸ (params?): ZodNull

Parameters
NameType
params?RawCreateParams
Returns

ZodNull


spa

• spa: (data: unknown, params?: InexactPartial<ParseParams>) => Promise<SafeParseReturnType<null, null>>

Alias of safeParseAsync

Type declaration

▸ (data, params?): Promise<SafeParseReturnType<null, null>>

Parameters
NameType
dataunknown
params?InexactPartial<ParseParams>
Returns

Promise<SafeParseReturnType<null, null>>

Inherited from

ZodType.spa


~standard

• ~standard: Props<null, null>

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<null>

Parameters

NameType
inputParseInput

Returns

ParseReturnType<null>

Overrides

ZodType._parse


_parseAsync

▸ _parseAsync(input): AsyncParseReturnType<null>

Parameters

NameType
inputParseInput

Returns

AsyncParseReturnType<null>

Inherited from

ZodType._parseAsync


_parseSync

▸ _parseSync(input): SyncParseReturnType<null>

Parameters

NameType
inputParseInput

Returns

SyncParseReturnType<null>

Inherited from

ZodType._parseSync


_processInputParams

▸ _processInputParams(input): Object

Parameters

NameType
inputParseInput

Returns

Object

NameType
ctxParseContext
statusParseStatus

Inherited from

ZodType._processInputParams


_refinement

▸ _refinement(refinement): ZodEffects<ZodNull, null, null>

Parameters

NameType
refinement(arg: null, ctx: RefinementCtx) => any

Returns

ZodEffects<ZodNull, null, null>

Inherited from

ZodType._refinement


and

▸ and<T>(incoming): ZodIntersection<ZodNull, T>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
incomingT

Returns

ZodIntersection<ZodNull, T>

Inherited from

ZodType.and


array

▸ array(): ZodArray<ZodNull, "many">

Returns

ZodArray<ZodNull, "many">

Inherited from

ZodType.array


brand

▸ brand<B>(brand?): ZodBranded<ZodNull, B>

Type parameters

NameType
Bextends string | number | symbol

Parameters

NameType
brand?B

Returns

ZodBranded<ZodNull, B>

Inherited from

ZodType.brand


catch

▸ catch(def): ZodCatch<ZodNull>

Parameters

NameType
defnull

Returns

ZodCatch<ZodNull>

Inherited from

ZodType.catch

▸ catch(def): ZodCatch<ZodNull>

Parameters

NameType
def(ctx: { error: ZodError<any> ; input: null }) => null

Returns

ZodCatch<ZodNull>

Inherited from

ZodType.catch


default

▸ default(def): ZodDefault<ZodNull>

Parameters

NameType
defnull

Returns

ZodDefault<ZodNull>

Inherited from

ZodType.default

▸ default(def): ZodDefault<ZodNull>

Parameters

NameType
def() => null

Returns

ZodDefault<ZodNull>

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


nullable

▸ nullable(): ZodNullable<ZodNull>

Returns

ZodNullable<ZodNull>

Inherited from

ZodType.nullable


nullish

▸ nullish(): ZodOptional<ZodNullable<ZodNull>>

Returns

ZodOptional<ZodNullable<ZodNull>>

Inherited from

ZodType.nullish


optional

▸ optional(): ZodOptional<ZodNull>

Returns

ZodOptional<ZodNull>

Inherited from

ZodType.optional


or

▸ or<T>(option): ZodUnion<[ZodNull, T]>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
optionT

Returns

ZodUnion<[ZodNull, T]>

Inherited from

ZodType.or


parse

▸ parse(data, params?): null

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

null

Inherited from

ZodType.parse


parseAsync

▸ parseAsync(data, params?): Promise<null>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

Promise<null>

Inherited from

ZodType.parseAsync


pipe

▸ pipe<T>(target): ZodPipeline<ZodNull, T>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
targetT

Returns

ZodPipeline<ZodNull, T>

Inherited from

ZodType.pipe


promise

▸ promise(): ZodPromise<ZodNull>

Returns

ZodPromise<ZodNull>

Inherited from

ZodType.promise


readonly

▸ readonly(): ZodReadonly<ZodNull>

Returns

ZodReadonly<ZodNull>

Inherited from

ZodType.readonly


refine

▸ refine<RefinedOutput>(check, message?): ZodEffects<ZodNull, RefinedOutput, null>

Type parameters

NameType
RefinedOutputextends null

Parameters

NameType
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

ZodType.refine

▸ refine(check, message?): ZodEffects<ZodNull, null, null>

Parameters

NameType
check(arg: null) => unknown
message?string | Partial<Omit<ZodCustomIssue, "code">> | (arg: null) => Partial<Omit<ZodCustomIssue, "code">>

Returns

ZodEffects<ZodNull, null, null>

Inherited from

ZodType.refine


refinement

▸ refinement<RefinedOutput>(check, refinementData): ZodEffects<ZodNull, RefinedOutput, null>

Type parameters

NameType
RefinedOutputextends null

Parameters

NameType
check(arg: null) => arg is RefinedOutput
refinementDataIssueData | (arg: null, ctx: RefinementCtx) => IssueData

Returns

ZodEffects<ZodNull, RefinedOutput, null>

Inherited from

ZodType.refinement

▸ refinement(check, refinementData): ZodEffects<ZodNull, null, null>

Parameters

NameType
check(arg: null) => boolean
refinementDataIssueData | (arg: null, ctx: RefinementCtx) => IssueData

Returns

ZodEffects<ZodNull, null, null>

Inherited from

ZodType.refinement


safeParse

▸ safeParse(data, params?): SafeParseReturnType<null, null>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

SafeParseReturnType<null, null>

Inherited from

ZodType.safeParse


safeParseAsync

▸ safeParseAsync(data, params?): Promise<SafeParseReturnType<null, null>>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

Promise<SafeParseReturnType<null, null>>

Inherited from

ZodType.safeParseAsync


superRefine

▸ superRefine<RefinedOutput>(refinement): ZodEffects<ZodNull, RefinedOutput, null>

Type parameters

NameType
RefinedOutputextends null

Parameters

NameType
refinement(arg: null, ctx: RefinementCtx) => arg is RefinedOutput

Returns

ZodEffects<ZodNull, RefinedOutput, null>

Inherited from

ZodType.superRefine

▸ superRefine(refinement): ZodEffects<ZodNull, null, null>

Parameters

NameType
refinement(arg: null, ctx: RefinementCtx) => void

Returns

ZodEffects<ZodNull, null, null>

Inherited from

ZodType.superRefine

▸ superRefine(refinement): ZodEffects<ZodNull, null, null>

Parameters

NameType
refinement(arg: null, ctx: RefinementCtx) => Promise<void>

Returns

ZodEffects<ZodNull, null, null>

Inherited from

ZodType.superRefine


transform

▸ transform<NewOut>(transform): ZodEffects<ZodNull, NewOut, null>

Type parameters

Name
NewOut

Parameters

NameType
transform(arg: null, ctx: RefinementCtx) => NewOut | Promise<NewOut>

Returns

ZodEffects<ZodNull, NewOut, null>

Inherited from

ZodType.transform


~validate

▸ ~validate(data): Result<null> | Promise<Result<null>>

Parameters

NameType
dataunknown

Returns

Result<null> | Promise<Result<null>>

Inherited from

ZodType.~validate