(
s: {
readonly input: unknown
readonly options: ParseOptions
issues: Array<SchemaIssue.Issue> | undefined
},
ast: AST,
key: PropertyKey,
exit: Exit.Failure<any, SchemaIssue.Issue>
)
| 2581 | const parseArrayConcurrent = iterateConcurrent<ArrayParserState, unknown>()(parseArrayOptions) |
| 2582 | |
| 2583 | const wrapPropertyKeyIssue = ( |
| 2584 | s: { |
| 2585 | readonly input: unknown |
| 2586 | readonly options: ParseOptions |
| 2587 | issues: Array<SchemaIssue.Issue> | undefined |
| 2588 | }, |
| 2589 | ast: AST, |
| 2590 | key: PropertyKey, |
| 2591 | exit: Exit.Failure<any, SchemaIssue.Issue> |
| 2592 | ) => { |
| 2593 | if (exit.cause.reasons.length === 0) { |
| 2594 | return exit |
| 2595 | } |
| 2596 | const issue = InternalSchemaCause.getSchemaIssue(exit.cause) |
| 2597 | if (issue === undefined) { |
| 2598 | return Exit.failCause( |
| 2599 | Cause.map( |
| 2600 | exit.cause, |
| 2601 | (issue) => |
| 2602 | new SchemaIssue.Composite( |
| 2603 | ast, |
| 2604 | [new SchemaIssue.Pointer([key], issue)], |
| 2605 | s.input, |
| 2606 | s.options |
| 2607 | ) |
| 2608 | ) |
| 2609 | ) |
| 2610 | } |
| 2611 | return addIssue(s, ast, new SchemaIssue.Pointer([key], issue)) |
| 2612 | } |
| 2613 | |
| 2614 | // Keeps `issue` when the parse collects every error. Otherwise returns the |
| 2615 | // failure that ends the parse. |
no test coverage detected