Hyperlinkv0.8.0-beta.28

Schema

Schema.FilterOutputtypeeffect/Schema.ts:6500
FilterOutput

The value a filter predicate (see makeFilter) may return.

Details

Each shape is normalized into an SchemaIssue.Issue (or undefined for success) before being attached to the parse result:

  • undefined: success. The input satisfies the filter.
  • true: success. Equivalent to undefined, useful when the predicate is a plain boolean expression.
  • false: generic failure. Produces an SchemaIssue.InvalidValue wrapping the input, with no custom message.
  • FilterIssue: a single failure. See FilterIssue for the shapes (string, SchemaIssue.Issue, or { path, issue }).
  • ReadonlyArray<FilterIssue>: several failures reported together. An empty array is treated as success; a single-element array is equivalent to returning that element directly; otherwise the entries are grouped into an SchemaIssue.Composite.
Source effect/Schema.ts:65005 lines
export type FilterOutput =
  | undefined
  | boolean
  | FilterIssue
  | ReadonlyArray<FilterIssue>
Referenced by 2 symbols