Interface: ZodCoercedNumber<T>
Defined in: packages/agentos/node_modules/zod/v4/classic/coerce.d.cts:6
Extends
Type Parameters
T
T = unknown
Properties
_def
_def:
$ZodNumberDef
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:10
Deprecated
Use .def instead.
Inherited from
_input
_input:
T
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:14
Deprecated
Use z.input<typeof schema> instead.
Inherited from
_output
_output:
number
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:12
Deprecated
Use z.output<typeof schema> instead.
Inherited from
_zod
_zod:
$ZodNumberInternals
Defined in: packages/agentos/node_modules/zod/v4/core/schemas.d.cts:93
Inherited from
~standard
~standard:
ZodStandardSchemaWithJSON<ZodCoercedNumber<T>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:15
Inherited from
def
def:
$ZodNumberDef
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:7
Inherited from
description?
optionaldescription:string
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:60
Inherited from
format
format:
string|null
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:335
Inherited from
isFinite
isFinite:
boolean
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:334
Deprecated
Number schemas no longer accept infinite values, so this always returns true.
Inherited from
isInt
isInt:
boolean
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:332
Deprecated
Check the format property instead.
Inherited from
maxValue
maxValue:
number|null
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:330
Inherited from
minValue
minValue:
number|null
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:329
Inherited from
spa()
spa: (
data,params?) =>Promise<ZodSafeParseResult<number>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:29
Parameters
data
unknown
params?
Returns
Promise<ZodSafeParseResult<number>>
Inherited from
type
type:
"number"
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:8
Inherited from
Methods
and()
and<
T>(incoming):ZodIntersection<ZodCoercedNumber<T>,T>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:52
Type Parameters
T
T extends SomeType
Parameters
incoming
T
Returns
ZodIntersection<ZodCoercedNumber<T>, T>
Inherited from
apply()
apply<
T>(fn):T
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:82
Type Parameters
T
T
Parameters
fn
(schema) => T
Returns
T
Inherited from
array()
array():
ZodArray<ZodCoercedNumber<T>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:50
Returns
ZodArray<ZodCoercedNumber<T>>
Inherited from
brand()
brand<
T,Dir>(value?):PropertyKeyextendsT?ZodCoercedNumber<T> :$ZodBranded<ZodCoercedNumber<T>,T,Dir>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:24
Type Parameters
T
T extends PropertyKey = PropertyKey
Dir
Dir extends "inout" | "in" | "out" = "out"
Parameters
value?
T
Returns
PropertyKey extends T ? ZodCoercedNumber<T> : $ZodBranded<ZodCoercedNumber<T>, T, Dir>
Inherited from
catch()
Call Signature
catch(
def):ZodCatch<ZodCoercedNumber<T>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:54
Parameters
def
number
Returns
ZodCatch<ZodCoercedNumber<T>>
Inherited from
Call Signature
catch(
def):ZodCatch<ZodCoercedNumber<T>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:55
Parameters
def
(ctx) => number
Returns
ZodCatch<ZodCoercedNumber<T>>
Inherited from
check()
check(...
checks):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:18
Parameters
checks
...($ZodCheck<number> | CheckFn<number>)[]
Returns
this
Inherited from
clone()
clone(
def?,params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:20
Parameters
def?
params?
parent
boolean
Returns
this
Inherited from
decode()
decode(
data,params?):number
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:31
Parameters
data
T
params?
Returns
number
Inherited from
decodeAsync()
decodeAsync(
data,params?):Promise<number>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:33
Parameters
data
T
params?
Returns
Promise<number>
Inherited from
default()
Call Signature
default(
def):ZodDefault<ZodCoercedNumber<T>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:46
Parameters
def
number
Returns
ZodDefault<ZodCoercedNumber<T>>
Inherited from
Call Signature
default(
def):ZodDefault<ZodCoercedNumber<T>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:47
Parameters
def
() => number
Returns
ZodDefault<ZodCoercedNumber<T>>
Inherited from
describe()
describe(
description):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:59
Returns a new instance that has been registered in z.globalRegistry with the specified description
Parameters
description
string
Returns
this
Inherited from
encode()
encode(
data,params?):T
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:30
Parameters
data
number
params?
Returns
T
Inherited from
encodeAsync()
encodeAsync(
data,params?):Promise<T>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:32
Parameters
data
number
params?
Returns
Promise<T>
Inherited from
exactOptional()
exactOptional():
ZodExactOptional<ZodCoercedNumber<T>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:42
Returns
ZodExactOptional<ZodCoercedNumber<T>>
Inherited from
finite()
finite(
params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:328
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
gt()
gt(
value,params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:308
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
gte()
gte(
value,params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:310
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
int()
int(
params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:317
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
isNullable()
isNullable():
boolean
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:81
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
isOptional()
isOptional():
boolean
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:72
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
lt()
lt(
value,params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:312
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
lte()
lte(
value,params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:314
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
max()
max(
value,params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:315
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
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:62
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
Call Signature
meta(
data):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:64
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
min()
min(
value,params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:311
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
multipleOf()
multipleOf(
value,params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:324
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
negative()
negative(
params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:322
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
nonnegative()
nonnegative(
params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:321
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
nonoptional()
nonoptional(
params?):ZodNonOptional<ZodCoercedNumber<T>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:43
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<ZodCoercedNumber<T>>
Inherited from
nonpositive()
nonpositive(
params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:323
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
nullable()
nullable():
ZodNullable<ZodCoercedNumber<T>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:44
Returns
ZodNullable<ZodCoercedNumber<T>>
Inherited from
nullish()
nullish():
ZodOptional<ZodNullable<ZodCoercedNumber<T>>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:45
Returns
ZodOptional<ZodNullable<ZodCoercedNumber<T>>>
Inherited from
optional()
optional():
ZodOptional<ZodCoercedNumber<T>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:41
Returns
ZodOptional<ZodCoercedNumber<T>>
Inherited from
or()
or<
T>(option):ZodUnion<[ZodCoercedNumber<T>,T]>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:51
Type Parameters
T
T extends SomeType
Parameters
option
T
Returns
ZodUnion<[ZodCoercedNumber<T>, T]>
Inherited from
overwrite()
overwrite(
fn):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:40
Parameters
fn
(x) => number
Returns
this
Inherited from
parse()
parse(
data,params?):number
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:25
Parameters
data
unknown
params?
Returns
number
Inherited from
parseAsync()
parseAsync(
data,params?):Promise<number>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:27
Parameters
data
unknown
params?
Returns
Promise<number>
Inherited from
pipe()
pipe<
T>(target):ZodPipe<ZodCoercedNumber<T>,T>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:56
Type Parameters
T
T extends $ZodType<any, number, $ZodTypeInternals<any, number>>
Parameters
target
$ZodType<any, number, $ZodTypeInternals<any, number>> | T
Returns
ZodPipe<ZodCoercedNumber<T>, T>
Inherited from
positive()
positive(
params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:320
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