Function
failSingleUnionCandidate
(
ast: Union,
cause: Cause.Cause<SchemaIssue.Issue>,
input: unknown,
options: ParseOptions
)
Source from the content-addressed store, hash-verified
| 2957 | } |
| 2958 | |
| 2959 | function failSingleUnionCandidate( |
| 2960 | ast: Union, |
| 2961 | cause: Cause.Cause<SchemaIssue.Issue>, |
| 2962 | input: unknown, |
| 2963 | options: ParseOptions |
| 2964 | ) { |
| 2965 | const issue = InternalSchemaCause.getSchemaIssue(cause) |
| 2966 | if (!issue) return Exit.failCause(cause) |
| 2967 | return Exit.fail(new SchemaIssue.AnyOf(ast, [issue], input, options)) |
| 2968 | } |
| 2969 | |
| 2970 | const parseUnion = iterateEager<{ |
| 2971 | readonly compile: (ast: AST) => SchemaParser.Parser |
Tested by
no test coverage detected