Aller au contenu principal

tupleOf()

tupleOf<S1, S2>(schema1, schema2, message?): TupleSchema<readonly [S1, S2]>

Tuple schema with specific types for better ergonomics.


Type Parameters

S1: S1 extends GenericSchema

S2: S2 extends GenericSchema


Parameters

schema1: S1

First schema.

schema2: S2

Second schema.

message?: string

Custom error message (optional).


Returns: TupleSchema<readonly [S1, S2]>

TupleSchema with two elements.


Since

2.0.0