Skip to main content

Interface: ZodNumberFormat<Format>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:371

Extends​

Extended by​

Type Parameters​

Format​

Format extends $ZodNumberFormats = $ZodNumberFormats

Properties​

_def​

_def: $ZodNumberDef

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:11

Deprecated​

Use .def instead.

Inherited from​

ZodNumber._def


_input​

_input: number

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:15

Deprecated​

Use z.input<typeof schema> instead.

Inherited from​

ZodNumber._input


_output​

_output: number

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:13

Deprecated​

Use z.output<typeof schema> instead.

Inherited from​

ZodNumber._output


_zod​

_zod: $ZodNumberFormatInternals<Format>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:372

Overrides​

ZodNumber._zod


~standard​

~standard: ZodStandardSchemaWithJSON<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:16

Inherited from​

ZodNumber.~standard


def​

def: $ZodNumberDef

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:8

Inherited from​

ZodNumber.def


description?​

optional description: string

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:63

Inherited from​

ZodNumber.description


format​

format: string | null

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:365

Inherited from​

ZodNumber.format


isFinite​

isFinite: boolean

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:364

Deprecated​

Number schemas no longer accept infinite values, so this always returns true.

Inherited from​

ZodNumber.isFinite


isInt​

isInt: boolean

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:362

Deprecated​

Check the format property instead.

Inherited from​

ZodNumber.isInt


maxValue​

maxValue: number | null

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:360

Inherited from​

ZodNumber.maxValue


minValue​

minValue: number | null

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:359

Inherited from​

ZodNumber.minValue


spa()​

spa: (data, params?) => Promise<ZodSafeParseResult<number>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:30

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

Promise<ZodSafeParseResult<number>>

Inherited from​

ZodNumber.spa


type​

type: "number"

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:9

Inherited from​

ZodNumber.type

Methods​

and()​

and<T>(incoming): ZodIntersection<ZodNumberFormat<Format>, T>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:55

Type Parameters​

T​

T extends SomeType

Parameters​

incoming​

T

Returns​

ZodIntersection<ZodNumberFormat<Format>, T>

Inherited from​

ZodNumber.and


apply()​

apply<T, TArgs>(fn, ...args): T

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:85

Type Parameters​

T​

T

TArgs​

TArgs extends unknown[] = []

Parameters​

fn​

(schema, ...args) => T

args​

...TArgs

Returns​

T

Inherited from​

ZodNumber.apply


array()​

array(): ZodArray<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:53

Returns​

ZodArray<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.array


brand()​

brand<T, Dir>(value?): PropertyKey extends T ? ZodNumberFormat<Format> : $ZodBranded<ZodNumberFormat<Format>, T, Dir>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:25

Type Parameters​

T​

T extends PropertyKey = PropertyKey

Dir​

Dir extends "inout" | "in" | "out" = "out"

Parameters​

value?​

T

Returns​

PropertyKey extends T ? ZodNumberFormat<Format> : $ZodBranded<ZodNumberFormat<Format>, T, Dir>

Inherited from​

ZodNumber.brand


catch()​

Call Signature​

catch(def): ZodCatch<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:57

Parameters​
def​

number

Returns​

ZodCatch<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.catch

Call Signature​

catch(def): ZodCatch<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:58

Parameters​
def​

(ctx) => number

Returns​

ZodCatch<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.catch


check()​

check(...checks): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:19

Parameters​

checks​

...($ZodCheck<number> | CheckFn<number>)[]

Returns​

this

Inherited from​

ZodNumber.check


clone()​

clone(def?, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:21

Parameters​

def?​

$ZodNumberDef

params?​
parent​

boolean

Returns​

this

Inherited from​

ZodNumber.clone


decode()​

decode(data, params?): number

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:34

Parameters​

data​

number

params?​

ParseContext<$ZodIssue>

Returns​

number

Inherited from​

ZodNumber.decode


decodeAsync()​

decodeAsync(data, params?): Promise<number>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:36

Parameters​

data​

number

params?​

ParseContext<$ZodIssue>

Returns​

Promise<number>

Inherited from​

ZodNumber.decodeAsync


default()​

Call Signature​

default(def): ZodDefault<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:49

Parameters​
def​

number

Returns​

ZodDefault<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.default

Call Signature​

default(def): ZodDefault<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:50

Parameters​
def​

() => number

Returns​

ZodDefault<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.default


describe()​

describe(description): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:62

Returns a new instance that has been registered in z.globalRegistry with the specified description

Parameters​

description​

string

Returns​

this

Inherited from​

ZodNumber.describe


encode()​

encode(data, params?): number

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:33

Parameters​

data​

number

params?​

ParseContext<$ZodIssue>

Returns​

number

Inherited from​

ZodNumber.encode


encodeAsync()​

encodeAsync(data, params?): Promise<number>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:35

Parameters​

data​

number

params?​

ParseContext<$ZodIssue>

Returns​

Promise<number>

Inherited from​

ZodNumber.encodeAsync


exactOptional()​

exactOptional(): ZodExactOptional<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:45

Returns​

ZodExactOptional<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.exactOptional


finite()​

finite(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:358

Parameters​

params?​

unknown

Returns​

this

Deprecated​

In v4 and later, z.number() does not allow infinite values by default. This is a no-op.

Inherited from​

ZodNumber.finite


gt()​

gt(value, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:338

Parameters​

value​

number

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Inherited from​

ZodNumber.gt


gte()​

gte(value, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:340

Identical to .min()

Parameters​

value​

number

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Inherited from​

ZodNumber.gte


int()​

int(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:347

Consider z.int() instead. This API is considered legacy; it will never be removed but a better alternative exists.

Parameters​

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<NonNullable<$ZodIssueInvalidType<unknown> | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<NonNullable<$ZodIssueInvalidType<unknown> | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Inherited from​

ZodNumber.int


isNullable()​

isNullable(): boolean

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:84

Returns​

boolean

Deprecated​

Try safe-parsing null (this is what isNullable does internally):

const schema = z.string().nullable();
const isNullable = schema.safeParse(null).success; // true

Inherited from​

ZodNumber.isNullable


isOptional()​

isOptional(): boolean

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:75

Returns​

boolean

Deprecated​

Try safe-parsing undefined (this is what isOptional does internally):

const schema = z.string().optional();
const isOptional = schema.safeParse(undefined).success; // true

Inherited from​

ZodNumber.isOptional


lt()​

lt(value, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:342

Parameters​

value​

number

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Inherited from​

ZodNumber.lt


lte()​

lte(value, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:344

Identical to .max()

Parameters​

value​

number

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Inherited from​

ZodNumber.lte


max()​

max(value, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:345

Parameters​

value​

number

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Inherited from​

ZodNumber.max


meta()​

Call Signature​

meta(): {[key: string]: unknown; deprecated?: boolean; description?: string; id?: string; title?: string; } | undefined

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:65

Returns the metadata associated with this instance in z.globalRegistry

Returns​

{[key: string]: unknown; deprecated?: boolean; description?: string; id?: string; title?: string; } | undefined

Inherited from​

ZodNumber.meta

Call Signature​

meta(data): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:67

Returns a new instance that has been registered in z.globalRegistry with the specified metadata

Parameters​
data​
deprecated?​

boolean

description?​

string

id?​

string

title?​

string

Returns​

this

Inherited from​

ZodNumber.meta


min()​

min(value, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:341

Parameters​

value​

number

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Inherited from​

ZodNumber.min


multipleOf()​

multipleOf(value, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:354

Parameters​

value​

number

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueNotMultipleOf<number | bigint>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<$ZodIssueNotMultipleOf<number | bigint>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Inherited from​

ZodNumber.multipleOf


negative()​

negative(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:352

Parameters​

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Inherited from​

ZodNumber.negative


nonnegative()​

nonnegative(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:351

Parameters​

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Inherited from​

ZodNumber.nonnegative


nonoptional()​

nonoptional(params?): ZodNonOptional<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:46

Parameters​

params?​

string |

{ error?: string | $ZodErrorMap<$ZodIssueInvalidType<unknown>>; message?: string; }

error?​

string | $ZodErrorMap<$ZodIssueInvalidType<unknown>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

ZodNonOptional<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.nonoptional


nonpositive()​

nonpositive(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:353

Parameters​

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Inherited from​

ZodNumber.nonpositive


nullable()​

nullable(): ZodNullable<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:47

Returns​

ZodNullable<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.nullable


nullish()​

nullish(): ZodOptional<ZodNullable<ZodNumberFormat<Format>>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:48

Returns​

ZodOptional<ZodNullable<ZodNumberFormat<Format>>>

Inherited from​

ZodNumber.nullish


optional()​

optional(): ZodOptional<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:44

Returns​

ZodOptional<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.optional


or()​

or<T>(option): ZodUnion<[ZodNumberFormat<Format>, T]>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:54

Type Parameters​

T​

T extends SomeType

Parameters​

option​

T

Returns​

ZodUnion<[ZodNumberFormat<Format>, T]>

Inherited from​

ZodNumber.or


overwrite()​

overwrite(fn): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:43

Parameters​

fn​

(x) => number

Returns​

this

Inherited from​

ZodNumber.overwrite


parse()​

parse(data, params?): number

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:26

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

number

Inherited from​

ZodNumber.parse


parseAsync()​

parseAsync(data, params?): Promise<number>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:28

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

Promise<number>

Inherited from​

ZodNumber.parseAsync


pipe()​

pipe<T>(target): ZodPipe<ZodNumberFormat<Format>, T>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:59

Type Parameters​

T​

T extends $ZodType<any, number, $ZodTypeInternals<any, number>>

Parameters​

target​

$ZodType<any, number, $ZodTypeInternals<any, number>> | T

Returns​

ZodPipe<ZodNumberFormat<Format>, T>

Inherited from​

ZodNumber.pipe


positive()​

positive(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:350

Parameters​

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Inherited from​

ZodNumber.positive


prefault()​

Call Signature​

prefault(def): ZodPrefault<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:51

Parameters​
def​

() => number

Returns​

ZodPrefault<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.prefault

Call Signature​

prefault(def): ZodPrefault<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:52

Parameters​
def​

number

Returns​

ZodPrefault<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.prefault


readonly()​

readonly(): ZodReadonly<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:60

Returns​

ZodReadonly<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.readonly


refine()​

refine<Ch>(check, params?): Ch extends (arg) => arg is R ? ZodNumberFormat<Format> & ZodType<R, number, $ZodTypeInternals<R, number>> : ZodNumberFormat<Format>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:41

Type Parameters​

Ch​

Ch extends (arg) => unknown

Parameters​

check​

Ch

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<NonNullable<$ZodIssue>>; message?: string; params?: Record<string, any>; path?: PropertyKey[]; when?: (payload) => boolean; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<NonNullable<$ZodIssue>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

params?​

Record<string, any>

path?​

PropertyKey[]

when?​

(payload) => boolean

If provided, the check runs only when this returns true. By default, it is skipped if prior parsing produced aborting issues.

Returns​

Ch extends (arg) => arg is R ? ZodNumberFormat<Format> & ZodType<R, number, $ZodTypeInternals<R, number>> : ZodNumberFormat<Format>

Inherited from​

ZodNumber.refine


register()​

register<R>(registry, ...meta): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:24

Type Parameters​

R​

R extends $ZodRegistry<MetadataType, $ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>>

Parameters​

registry​

R

meta​

...ZodNumberFormat<Format> extends R["_schema"] ? undefined extends R["_meta"] ? [$replace<R["_meta"], R["_schema"] & ZodNumberFormat<Format>>?] : [$replace<R["_meta"], R["_schema"] & ZodNumberFormat<Format>>] : ["Incompatible schema"]

Returns​

this

Inherited from​

ZodNumber.register


safe()​

safe(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:349

Parameters​

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<NonNullable<$ZodIssueInvalidType<unknown> | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<NonNullable<$ZodIssueInvalidType<unknown> | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Deprecated​

This is now identical to .int(). Only numbers in the safe integer range are accepted.

Inherited from​

ZodNumber.safe


safeDecode()​

safeDecode(data, params?): ZodSafeParseResult<number>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:38

Parameters​

data​

number

params?​

ParseContext<$ZodIssue>

Returns​

ZodSafeParseResult<number>

Inherited from​

ZodNumber.safeDecode


safeDecodeAsync()​

safeDecodeAsync(data, params?): Promise<ZodSafeParseResult<number>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:40

Parameters​

data​

number

params?​

ParseContext<$ZodIssue>

Returns​

Promise<ZodSafeParseResult<number>>

Inherited from​

ZodNumber.safeDecodeAsync


safeEncode()​

safeEncode(data, params?): ZodSafeParseResult<number>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:37

Parameters​

data​

number

params?​

ParseContext<$ZodIssue>

Returns​

ZodSafeParseResult<number>

Inherited from​

ZodNumber.safeEncode


safeEncodeAsync()​

safeEncodeAsync(data, params?): Promise<ZodSafeParseResult<number>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:39

Parameters​

data​

number

params?​

ParseContext<$ZodIssue>

Returns​

Promise<ZodSafeParseResult<number>>

Inherited from​

ZodNumber.safeEncodeAsync


safeParse()​

safeParse(data, params?): ZodSafeParseResult<number>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:27

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

ZodSafeParseResult<number>

Inherited from​

ZodNumber.safeParse


safeParseAsync()​

safeParseAsync(data, params?): Promise<ZodSafeParseResult<number>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:29

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

Promise<ZodSafeParseResult<number>>

Inherited from​

ZodNumber.safeParseAsync


step()​

step(value, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:356

Parameters​

value​

number

params?​

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueNotMultipleOf<number | bigint>>; message?: string; }

abort?​

boolean

If true, no later checks will be executed if this check fails. Default false.

error?​

string | $ZodErrorMap<$ZodIssueNotMultipleOf<number | bigint>>

message?​

string

Deprecated

This parameter is deprecated. Use error instead.

Returns​

this

Deprecated​

Use .multipleOf() instead.

Inherited from​

ZodNumber.step


superRefine()​

superRefine(refinement, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:42

Parameters​

refinement​

(arg, ctx) => void | Promise<void>

params?​

$ZodSuperRefineParams

Returns​

this

Inherited from​

ZodNumber.superRefine


toJSONSchema()​

toJSONSchema(params?): ZodStandardJSONSchemaPayload<ZodNumberFormat<Format>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:18

Converts this schema to a JSON Schema representation.

Parameters​

params?​

ToJSONSchemaParams

Returns​

ZodStandardJSONSchemaPayload<ZodNumberFormat<Format>>

Inherited from​

ZodNumber.toJSONSchema


transform()​

transform<NewOut>(transform): ZodPipe<ZodNumberFormat<Format>, ZodTransform<Awaited<NewOut>, number>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:56

Type Parameters​

NewOut​

NewOut

Parameters​

transform​

(arg, ctx) => NewOut | Promise<NewOut>

Returns​

ZodPipe<ZodNumberFormat<Format>, ZodTransform<Awaited<NewOut>, number>>

Inherited from​

ZodNumber.transform


validate()​

validate(data, params?): data is number

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:31

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

data is number

Inherited from​

ZodNumber.validate


validateAsync()​

validateAsync(data, params?): Promise<boolean>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:32

Parameters​

data​

unknown

params?​

ParseContext<$ZodIssue>

Returns​

Promise<boolean>

Inherited from​

ZodNumber.validateAsync


with()​

with(...checks): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:20

Parameters​

checks​

...($ZodCheck<number> | CheckFn<number>)[]

Returns​

this

Inherited from​

ZodNumber.with