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