effect-io-ai

Package: effect
Module: SchemaAST

SchemaAST.Filter

Represents a single validation check attached to an AST node.

Details

Use .annotate() to add metadata and .abort() to mark as aborting. Combine with another check via .and() to form a FilterGroup.

See

Signature

declare class Filter<E> { constructor(
    run: (input: E, self: AST, options: ParseOptions) => SchemaIssue.Issue | undefined,
    annotations: Schema.Annotations.Filter | undefined = undefined,
    /**
     * Whether the parsing process should be aborted after this check has failed.
     */
    aborted: boolean = false
  ) }

Source

Since v4.0.0