tuple
DDataParser.tuple() describes a positional array with different parsers per index and, optionally, a rest. Perfect to model multi-value returns or fixed parameters.
Interactive example
Parameters
shape: array of parsers[DP.string(), DP.number(), ...].rest: optional parser applied to extra elements.checkers:checkerArrayMin,checkerArrayMax,checkerRefineto validate the overall shape.
Return value
A DataParserTuple. schema.parse(data) returns DEither.success<[...]> if all elements satisfy their parser, otherwise DEither.error<DataParserError> with the incriminated index.
See also
templateLiteral- Parser for formatted stringsnil- Parser for null/undefined values
