sthir icon indicating copy to clipboard operation
sthir copied to clipboard

`accumulateErrors`

Open devanshj opened this issue 2 years ago • 0 comments

/**
 * Creates a new parser that accumulates
 * and yields the errors of the parser
 * passed in a tree-like format,
 * something like this...
 * ```
 * is not of type 'A' as
 *   it is missing key 'x'
 *   it's value at key 'y' is not of type 'B' as
 *     it is missing key 'p'
 *     it's value at key 'q' is not type 'string'
 *   it's value at key 'z' is not type 'number'
 * ```
 */
declare const accumulateErrors:
  <T extends UnknownParser>(p: T) => T

devanshj avatar Mar 17 '23 13:03 devanshj