@morojs/moro / z / _ZodType
Interface: _ZodType<Internals>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:76
Extends
ZodType
<any
,any
,Internals
>
Extended by
_ZodString
_ZodNumber
_ZodBoolean
_ZodBigInt
ZodSymbol
ZodUndefined
ZodNull
ZodAny
ZodUnknown
ZodNever
ZodVoid
_ZodDate
ZodArray
ZodObject
ZodUnion
ZodIntersection
ZodTuple
ZodRecord
ZodMap
ZodSet
ZodEnum
ZodLiteral
ZodFile
ZodTransform
ZodOptional
ZodNullable
ZodDefault
ZodPrefault
ZodNonOptional
ZodSuccess
ZodCatch
ZodNaN
ZodPipe
ZodReadonly
ZodTemplateLiteral
ZodLazy
ZodPromise
ZodFunction
ZodCustom
Type Parameters
Internals
Internals
extends $ZodTypeInternals
= $ZodTypeInternals
Properties
~~_def~~
_def:
Internals
["def"
]
Defined in: node_modules/zod/v4/classic/schemas.d.cts:8
Deprecated
Use .def
instead.
Inherited from
~~_input~~
_input:
Internals
["input"
]
Defined in: node_modules/zod/v4/classic/schemas.d.cts:12
Deprecated
Use z.input<typeof schema>
instead.
Inherited from
~~_output~~
_output:
Internals
["output"
]
Defined in: node_modules/zod/v4/classic/schemas.d.cts:10
Deprecated
Use z.output<typeof schema>
instead.
Inherited from
_zod
_zod:
Internals
Defined in: node_modules/zod/v4/core/schemas.d.cts:89
Inherited from
~standard
~standard:
$ZodStandardSchema
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/core/schemas.d.cts:90
Inherited from
def
def:
Internals
["def"
]
Defined in: node_modules/zod/v4/classic/schemas.d.cts:5
Inherited from
description?
optional
description:string
Defined in: node_modules/zod/v4/classic/schemas.d.cts:53
Inherited from
spa()
spa: (
data
,params?
) =>Promise
<ZodSafeParseResult
<output
<_ZodType
<Internals
>>>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:23
Parameters
data
unknown
params?
Returns
Promise
<ZodSafeParseResult
<output
<_ZodType
<Internals
>>>>
Inherited from
type
type:
Internals
["def"
]["type"
]
Defined in: node_modules/zod/v4/classic/schemas.d.cts:6
Inherited from
Methods
and()
and<
T
>(incoming
):ZodIntersection
<_ZodType
<Internals
>,T
>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:45
Type Parameters
T
T
extends SomeType
Parameters
incoming
T
Returns
ZodIntersection
<_ZodType
<Internals
>, T
>
Inherited from
array()
array():
ZodArray
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:43
Returns
ZodArray
<_ZodType
<Internals
>>
Inherited from
brand()
brand<
T
>(value?
):PropertyKey
extendsT
?_ZodType
<Internals
> :$ZodBranded
<_ZodType
<Internals
>,T
>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:18
Type Parameters
T
T
extends PropertyKey
= PropertyKey
Parameters
value?
T
Returns
PropertyKey
extends T
? _ZodType
<Internals
> : $ZodBranded
<_ZodType
<Internals
>, T
>
Inherited from
catch()
Call Signature
catch(
def
):ZodCatch
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:47
Parameters
def
output
<_ZodType
<Internals
>>
Returns
ZodCatch
<_ZodType
<Internals
>>
Inherited from
Call Signature
catch(
def
):ZodCatch
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:48
Parameters
def
(ctx
) => output
<_ZodType
<Internals
>>
Returns
ZodCatch
<_ZodType
<Internals
>>
Inherited from
check()
check(...
checks
):this
Defined in: node_modules/zod/v4/classic/schemas.d.cts:13
Parameters
checks
...(CheckFn
<output
<_ZodType
<Internals
>>> | $ZodCheck
<output
<_ZodType
<Internals
>>>)[]
Returns
this
Inherited from
clone()
clone(
def?
,params?
):this
Defined in: node_modules/zod/v4/classic/schemas.d.cts:14
Parameters
def?
Internals
["def"
]
params?
parent
boolean
Returns
this
Inherited from
decode()
decode(
data
,params?
):output
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:25
Parameters
data
input
<_ZodType
<Internals
>>
params?
Returns
output
<_ZodType
<Internals
>>
Inherited from
decodeAsync()
decodeAsync(
data
,params?
):Promise
<output
<_ZodType
<Internals
>>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:27
Parameters
data
input
<_ZodType
<Internals
>>
params?
Returns
Promise
<output
<_ZodType
<Internals
>>>
Inherited from
default()
Call Signature
default(
def
):ZodDefault
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:39
Parameters
def
output
<_ZodType
<Internals
>>
Returns
ZodDefault
<_ZodType
<Internals
>>
Inherited from
Call Signature
default(
def
):ZodDefault
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:40
Parameters
def
() => NoUndefined
<output
<_ZodType
<Internals
>>>
Returns
ZodDefault
<_ZodType
<Internals
>>
Inherited from
describe()
describe(
description
):this
Defined in: node_modules/zod/v4/classic/schemas.d.cts:52
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?
):input
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:24
Parameters
data
output
<_ZodType
<Internals
>>
params?
Returns
input
<_ZodType
<Internals
>>
Inherited from
encodeAsync()
encodeAsync(
data
,params?
):Promise
<input
<_ZodType
<Internals
>>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:26
Parameters
data
output
<_ZodType
<Internals
>>
params?
Returns
Promise
<input
<_ZodType
<Internals
>>>
Inherited from
~~isNullable()~~
isNullable():
boolean
Defined in: node_modules/zod/v4/classic/schemas.d.cts:74
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: node_modules/zod/v4/classic/schemas.d.cts:65
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
meta()
Call Signature
meta():
undefined
| {[key
:string
]:unknown
;deprecated?
:boolean
;description?
:string
;id?
:string
;title?
:string
; }
Defined in: node_modules/zod/v4/classic/schemas.d.cts:55
Returns the metadata associated with this instance in z.globalRegistry
Returns
undefined
| {[key
: string
]: unknown
; deprecated?
: boolean
; description?
: string
; id?
: string
; title?
: string
; }
Inherited from
Call Signature
meta(
data
):this
Defined in: node_modules/zod/v4/classic/schemas.d.cts:57
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
nonoptional()
nonoptional(
params?
):ZodNonOptional
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:36
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
<_ZodType
<Internals
>>
Inherited from
nullable()
nullable():
ZodNullable
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:37
Returns
ZodNullable
<_ZodType
<Internals
>>
Inherited from
nullish()
nullish():
ZodOptional
<ZodNullable
<_ZodType
<Internals
>>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:38
Returns
ZodOptional
<ZodNullable
<_ZodType
<Internals
>>>
Inherited from
optional()
optional():
ZodOptional
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:35
Returns
ZodOptional
<_ZodType
<Internals
>>
Inherited from
or()
or<
T
>(option
):ZodUnion
<[_ZodType
<Internals
>,T
]>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:44
Type Parameters
T
T
extends SomeType
Parameters
option
T
Returns
ZodUnion
<[_ZodType
<Internals
>, T
]>
Inherited from
overwrite()
overwrite(
fn
):this
Defined in: node_modules/zod/v4/classic/schemas.d.cts:34
Parameters
fn
(x
) => output
<_ZodType
<Internals
>>
Returns
this
Inherited from
parse()
parse(
data
,params?
):output
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:19
Parameters
data
unknown
params?
Returns
output
<_ZodType
<Internals
>>
Inherited from
parseAsync()
parseAsync(
data
,params?
):Promise
<output
<_ZodType
<Internals
>>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:21
Parameters
data
unknown
params?
Returns
Promise
<output
<_ZodType
<Internals
>>>
Inherited from
pipe()
pipe<
T
>(target
):ZodPipe
<_ZodType
<Internals
>,T
>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:49
Type Parameters
T
T
extends $ZodType
<any
, output
<_ZodType
<Internals
>>, $ZodTypeInternals
<any
, output
<_ZodType
<Internals
>>>>
Parameters
target
T
| $ZodType
<any
, output
<_ZodType
<Internals
>>, $ZodTypeInternals
<any
, output
<_ZodType
<Internals
>>>>
Returns
ZodPipe
<_ZodType
<Internals
>, T
>
Inherited from
prefault()
Call Signature
prefault(
def
):ZodPrefault
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:41
Parameters
def
() => input
<_ZodType
<Internals
>>
Returns
ZodPrefault
<_ZodType
<Internals
>>
Inherited from
Call Signature
prefault(
def
):ZodPrefault
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:42
Parameters
def
input
<_ZodType
<Internals
>>
Returns
ZodPrefault
<_ZodType
<Internals
>>
Inherited from
readonly()
readonly():
ZodReadonly
<_ZodType
<Internals
>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:50
Returns
ZodReadonly
<_ZodType
<Internals
>>
Inherited from
refine()
refine(
check
,params?
):this
Defined in: node_modules/zod/v4/classic/schemas.d.cts:32
Parameters
check
(arg
) => unknown
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, this check will only be executed if the function returns true
. Defaults to payload => z.util.isAborted(payload)
.
Returns
this
Inherited from
register()
register<
R
>(registry
, ...meta
):this
Defined in: node_modules/zod/v4/classic/schemas.d.cts:17
Type Parameters
R
R
extends $ZodRegistry
<MetadataType
, $ZodType
<unknown
, unknown
, $ZodTypeInternals
<unknown
, unknown
>>>
Parameters
registry
R
meta
..._ZodType
<Internals
> extends R
["_schema"
] ? undefined
extends R
["_meta"
] ? [$replace
<R
["_meta"
], R
["_schema"
] & _ZodType
<Internals
>>?] : [$replace
<R
["_meta"
], R
["_schema"
] & _ZodType
<Internals
>>] : ["Incompatible schema"
]
Returns
this
Inherited from
safeDecode()
safeDecode(
data
,params?
):ZodSafeParseResult
<output
<_ZodType
<Internals
>>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:29
Parameters
data
input
<_ZodType
<Internals
>>
params?
Returns
ZodSafeParseResult
<output
<_ZodType
<Internals
>>>
Inherited from
safeDecodeAsync()
safeDecodeAsync(
data
,params?
):Promise
<ZodSafeParseResult
<output
<_ZodType
<Internals
>>>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:31
Parameters
data
input
<_ZodType
<Internals
>>
params?
Returns
Promise
<ZodSafeParseResult
<output
<_ZodType
<Internals
>>>>
Inherited from
safeEncode()
safeEncode(
data
,params?
):ZodSafeParseResult
<input
<_ZodType
<Internals
>>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:28
Parameters
data
output
<_ZodType
<Internals
>>
params?
Returns
ZodSafeParseResult
<input
<_ZodType
<Internals
>>>
Inherited from
safeEncodeAsync()
safeEncodeAsync(
data
,params?
):Promise
<ZodSafeParseResult
<input
<_ZodType
<Internals
>>>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:30
Parameters
data
output
<_ZodType
<Internals
>>
params?
Returns
Promise
<ZodSafeParseResult
<input
<_ZodType
<Internals
>>>>
Inherited from
safeParse()
safeParse(
data
,params?
):ZodSafeParseResult
<output
<_ZodType
<Internals
>>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:20
Parameters
data
unknown
params?
Returns
ZodSafeParseResult
<output
<_ZodType
<Internals
>>>
Inherited from
safeParseAsync()
safeParseAsync(
data
,params?
):Promise
<ZodSafeParseResult
<output
<_ZodType
<Internals
>>>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:22
Parameters
data
unknown
params?
Returns
Promise
<ZodSafeParseResult
<output
<_ZodType
<Internals
>>>>
Inherited from
superRefine()
superRefine(
refinement
):this
Defined in: node_modules/zod/v4/classic/schemas.d.cts:33
Parameters
refinement
(arg
, ctx
) => void
| Promise
<void
>
Returns
this
Inherited from
transform()
transform<
NewOut
>(transform
):ZodPipe
<_ZodType
<Internals
>,ZodTransform
<Awaited
<NewOut
>,output
<_ZodType
<Internals
>>>>
Defined in: node_modules/zod/v4/classic/schemas.d.cts:46
Type Parameters
NewOut
NewOut
Parameters
transform
(arg
, ctx
) => NewOut
| Promise
<NewOut
>
Returns
ZodPipe
<_ZodType
<Internals
>, ZodTransform
<Awaited
<NewOut
>, output
<_ZodType
<Internals
>>>>