Skip to main content

tupleWithRest()

tupleWithRest<T, R>(schemas, restSchema, message?): TupleWithRestSchema<T, R>

Tuple schema with variable length (rest).


Type Parametersโ€‹

T: T extends readonly GenericSchema[]โ€‹

R: R extends GenericSchemaโ€‹


Parametersโ€‹

schemas: Tโ€‹

Array of schemas for fixed tuple positions.

restSchema: Rโ€‹

Schema for rest elements.

message?: stringโ€‹

Custom error message (optional).


Returns: TupleWithRestSchema<T, R>โ€‹

TupleWithRestSchema with variable length.


Sinceโ€‹

2.0.0