record
DDataParser.record(keyParser, valueParser) validates dynamic dictionaries by checking both the shape of the keys (string/literal/template literal/number/union) and the associated values.
Interactive example
Parameters
key: parser for the keys (DP.string(),DP.templateLiteral(...),DP.literal([...]), etc.).input: parser applied to each entry (DP.number(),DP.object(...), ...).checkers:checkerRefineto express global constraints (required keys, minimum sum, etc.).errorMessage: generic message if the input is not an indexable object.
Return value
A DataParserRecord. schema.parse(data) returns DEither.success<Record<OutputKey, OutputValue>> or DEither.error<DataParserError> with the incriminated keys.
