Tuple
A tuple validates a fixed-length array where each element has its own schema. The input must have exactly as many elements as there are schemas — too few or too many elements will result in a parsing error.
Example
Section titled “Example”import * as p from '@vbudovski/paseri';
const schema = p.tuple(p.number(), p.string());const data = [1, 'foo'];
const result = schema.safeParse(data);if (result.ok) { // result.value typed as `[number, string]`.}