@morojs/moro


@morojs/moro / z / ZodTuple

Interface: ZodTuple<T, Rest>

Defined in: node_modules/zod/v4/classic/schemas.d.cts:470

Extends

Type Parameters

T

T extends TupleItems = readonly $ZodType[]

Rest

Rest extends SomeType | null = $ZodType | null

Properties

~~_def~~

_def: $ZodTupleDef<T, Rest>

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

Deprecated

Use .def instead.

Inherited from

_ZodType._def


~~_input~~

_input: [...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]

Defined in: node_modules/zod/v4/classic/schemas.d.cts:12

Deprecated

Use z.input<typeof schema> instead.

Inherited from

_ZodType._input


~~_output~~

_output: [...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

Defined in: node_modules/zod/v4/classic/schemas.d.cts:10

Deprecated

Use z.output<typeof schema> instead.

Inherited from

_ZodType._output


_zod

Defined in: node_modules/zod/v4/core/schemas.d.cts:89

Inherited from

_ZodType._zod


~standard

~standard: $ZodStandardSchema<ZodTuple<T, Rest>>

Defined in: node_modules/zod/v4/core/schemas.d.cts:90

Inherited from

_ZodType.~standard


def

def: $ZodTupleDef<T, Rest>

Defined in: node_modules/zod/v4/classic/schemas.d.cts:5

Inherited from

_ZodType.def


description?

optional description: string

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

Inherited from

_ZodType.description


spa()

spa: (data, params?) => Promise<ZodSafeParseResult<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>>

Defined in: node_modules/zod/v4/classic/schemas.d.cts:23

Parameters

data

unknown

params?

ParseContext<$ZodIssue>

Returns

Promise<ZodSafeParseResult<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>>

Inherited from

_ZodType.spa


type

type: "tuple"

Defined in: node_modules/zod/v4/classic/schemas.d.cts:6

Inherited from

_ZodType.type

Methods

and()

and<T>(incoming): ZodIntersection<ZodTuple<T, Rest>, T>

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

Type Parameters

T

T extends SomeType

Parameters

incoming

T

Returns

ZodIntersection<ZodTuple<T, Rest>, T>

Inherited from

_ZodType.and


array()

array(): ZodArray<ZodTuple<T, Rest>>

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

Returns

ZodArray<ZodTuple<T, Rest>>

Inherited from

_ZodType.array


brand()

brand<T>(value?): PropertyKey extends T ? ZodTuple<T, Rest> : $ZodBranded<ZodTuple<T, Rest>, 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 ? ZodTuple<T, Rest> : $ZodBranded<ZodTuple<T, Rest>, T>

Inherited from

_ZodType.brand


catch()

Call Signature

catch(def): ZodCatch<ZodTuple<T, Rest>>

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

Parameters
def

[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

Returns

ZodCatch<ZodTuple<T, Rest>>

Inherited from

_ZodType.catch

Call Signature

catch(def): ZodCatch<ZodTuple<T, Rest>>

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

Parameters
def

(ctx) => [...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

Returns

ZodCatch<ZodTuple<T, Rest>>

Inherited from

_ZodType.catch


check()

check(...checks): this

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

Parameters

checks

...(CheckFn<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]> | $ZodCheck<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>)[]

Returns

this

Inherited from

_ZodType.check


clone()

clone(def?, params?): this

Defined in: node_modules/zod/v4/classic/schemas.d.cts:14

Parameters

def?

$ZodTupleDef<T, Rest>

params?
parent

boolean

Returns

this

Inherited from

_ZodType.clone


decode()

decode(data, params?): [...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

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

Parameters

data

[...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]

params?

ParseContext<$ZodIssue>

Returns

[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

Inherited from

_ZodType.decode


decodeAsync()

decodeAsync(data, params?): Promise<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>

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

Parameters

data

[...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]

params?

ParseContext<$ZodIssue>

Returns

Promise<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>

Inherited from

_ZodType.decodeAsync


default()

Call Signature

default(def): ZodDefault<ZodTuple<T, Rest>>

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

Parameters
def

[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

Returns

ZodDefault<ZodTuple<T, Rest>>

Inherited from

_ZodType.default

Call Signature

default(def): ZodDefault<ZodTuple<T, Rest>>

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

Parameters
def

() => NoUndefined<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>

Returns

ZodDefault<ZodTuple<T, Rest>>

Inherited from

_ZodType.default


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

_ZodType.describe


encode()

encode(data, params?): [...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]

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

Parameters

data

[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

params?

ParseContext<$ZodIssue>

Returns

[...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]

Inherited from

_ZodType.encode


encodeAsync()

encodeAsync(data, params?): Promise<[...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]>

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

Parameters

data

[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

params?

ParseContext<$ZodIssue>

Returns

Promise<[...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]>

Inherited from

_ZodType.encodeAsync


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

_ZodType.isNullable


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

_ZodType.isOptional


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

_ZodType.meta

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

_ZodType.meta


nonoptional()

nonoptional(params?): ZodNonOptional<ZodTuple<T, Rest>>

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<ZodTuple<T, Rest>>

Inherited from

_ZodType.nonoptional


nullable()

nullable(): ZodNullable<ZodTuple<T, Rest>>

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

Returns

ZodNullable<ZodTuple<T, Rest>>

Inherited from

_ZodType.nullable


nullish()

nullish(): ZodOptional<ZodNullable<ZodTuple<T, Rest>>>

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

Returns

ZodOptional<ZodNullable<ZodTuple<T, Rest>>>

Inherited from

_ZodType.nullish


optional()

optional(): ZodOptional<ZodTuple<T, Rest>>

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

Returns

ZodOptional<ZodTuple<T, Rest>>

Inherited from

_ZodType.optional


or()

or<T>(option): ZodUnion<[ZodTuple<T, Rest>, T]>

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

Type Parameters

T

T extends SomeType

Parameters

option

T

Returns

ZodUnion<[ZodTuple<T, Rest>, T]>

Inherited from

_ZodType.or


overwrite()

overwrite(fn): this

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

Parameters

fn

(x) => [...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

Returns

this

Inherited from

_ZodType.overwrite


parse()

parse(data, params?): [...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

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

Parameters

data

unknown

params?

ParseContext<$ZodIssue>

Returns

[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

Inherited from

_ZodType.parse


parseAsync()

parseAsync(data, params?): Promise<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>

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

Parameters

data

unknown

params?

ParseContext<$ZodIssue>

Returns

Promise<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>

Inherited from

_ZodType.parseAsync


pipe()

pipe<T>(target): ZodPipe<ZodTuple<T, Rest>, T>

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

Type Parameters

T

T extends $ZodType<any, [...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]], $ZodTypeInternals<any, [...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>>

Parameters

target

T | $ZodType<any, [...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]], $ZodTypeInternals<any, [...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>>

Returns

ZodPipe<ZodTuple<T, Rest>, T>

Inherited from

_ZodType.pipe


prefault()

Call Signature

prefault(def): ZodPrefault<ZodTuple<T, Rest>>

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

Parameters
def

() => [...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]

Returns

ZodPrefault<ZodTuple<T, Rest>>

Inherited from

_ZodType.prefault

Call Signature

prefault(def): ZodPrefault<ZodTuple<T, Rest>>

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

Parameters
def

[...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]

Returns

ZodPrefault<ZodTuple<T, Rest>>

Inherited from

_ZodType.prefault


readonly()

readonly(): ZodReadonly<ZodTuple<T, Rest>>

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

Returns

ZodReadonly<ZodTuple<T, Rest>>

Inherited from

_ZodType.readonly


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

_ZodType.refine


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

...ZodTuple<T, Rest> extends R["_schema"] ? undefined extends R["_meta"] ? [$replace<R["_meta"], R["_schema"] & ZodTuple<T, Rest>>?] : [$replace<R["_meta"], R["_schema"] & ZodTuple<T, Rest>>] : ["Incompatible schema"]

Returns

this

Inherited from

_ZodType.register


rest()

rest<Rest>(rest): ZodTuple<T, Rest>

Defined in: node_modules/zod/v4/classic/schemas.d.cts:471

Type Parameters

Rest

Rest extends SomeType = $ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>

Parameters

rest

Rest

Returns

ZodTuple<T, Rest>


safeDecode()

safeDecode(data, params?): ZodSafeParseResult<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>

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

Parameters

data

[...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]

params?

ParseContext<$ZodIssue>

Returns

ZodSafeParseResult<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>

Inherited from

_ZodType.safeDecode


safeDecodeAsync()

safeDecodeAsync(data, params?): Promise<ZodSafeParseResult<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>>

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

Parameters

data

[...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]

params?

ParseContext<$ZodIssue>

Returns

Promise<ZodSafeParseResult<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>>

Inherited from

_ZodType.safeDecodeAsync


safeEncode()

safeEncode(data, params?): ZodSafeParseResult<[...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]>

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

Parameters

data

[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

params?

ParseContext<$ZodIssue>

Returns

ZodSafeParseResult<[...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]>

Inherited from

_ZodType.safeEncode


safeEncodeAsync()

safeEncodeAsync(data, params?): Promise<ZodSafeParseResult<[...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]>>

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

Parameters

data

[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]

params?

ParseContext<$ZodIssue>

Returns

Promise<ZodSafeParseResult<[...TupleInputTypeWithOptionals<T>[], ...(Rest extends SomeType ? input<Rest<Rest>>[] : [])[]]>>

Inherited from

_ZodType.safeEncodeAsync


safeParse()

safeParse(data, params?): ZodSafeParseResult<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>

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

Parameters

data

unknown

params?

ParseContext<$ZodIssue>

Returns

ZodSafeParseResult<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>

Inherited from

_ZodType.safeParse


safeParseAsync()

safeParseAsync(data, params?): Promise<ZodSafeParseResult<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>>

Defined in: node_modules/zod/v4/classic/schemas.d.cts:22

Parameters

data

unknown

params?

ParseContext<$ZodIssue>

Returns

Promise<ZodSafeParseResult<[...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>>

Inherited from

_ZodType.safeParseAsync


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

_ZodType.superRefine


transform()

transform<NewOut>(transform): ZodPipe<ZodTuple<T, Rest>, ZodTransform<Awaited<NewOut>, [...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>>

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

Type Parameters

NewOut

NewOut

Parameters

transform

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

Returns

ZodPipe<ZodTuple<T, Rest>, ZodTransform<Awaited<NewOut>, [...TupleOutputTypeWithOptionals<T>[], ...(Rest extends SomeType ? output<Rest<Rest>>[] : [])[]]>>

Inherited from

_ZodType.transform