( ast: SchemaAST.AST, out: Schema.FilterOutput, input?: unknown, options?: SchemaAST.ParseOptions )
| 824 | |
| 825 | /** @internal */ |
| 826 | export function normalizeFilterOutput( |
| 827 | ast: SchemaAST.AST, |
| 828 | out: Schema.FilterOutput, |
| 829 | input?: unknown, |
| 830 | options?: SchemaAST.ParseOptions |
| 831 | ): Issue | undefined { |
| 832 | if (Array.isArray(out)) { |
| 833 | if (!Arr.isReadonlyArrayNonEmpty(out)) { |
| 834 | return undefined |
| 835 | } |
| 836 | return out.length === 1 |
| 837 | ? makeFilterIssue(out[0], input, options) |
| 838 | : new Composite(ast, Arr.map(out, (entry) => makeFilterIssue(entry, input, options)), input, options) |
| 839 | } |
| 840 | return makeSingle(out as undefined | boolean | Schema.FilterIssue, input, options) |
| 841 | } |
| 842 | |
| 843 | /** |
| 844 | * A function type that converts an {@link Issue} into a formatted |
nothing calls this directly
no test coverage detected