TupleWithRestSchema<T, Rest>
TupleWithRestSchema<
T,Rest> =Schema<[...{ [K in keyof T]: Infer<T[K]> },...Infer<Rest>[]]> &object
Tuple schema with rest elements.
Type Declarationโ
type: "tuple"โ
items: Tโ
restSchema: Restโ
note
To distinguish from TupleSchema at runtime, use the hasTupleRest type guard:
if (hasTupleRest(schema)) {
// This is a TupleWithRestSchema
}
Type Parametersโ
T: T extends readonly GenericSchema[]โ
The tuple items type
Rest: Rest extends GenericSchemaโ
The rest element schema type
Sinceโ
2.0.0