Package: effect
Module: SchemaAST
Represents a single validation check attached to an AST node.
Details
run — the validation function. Returns undefined on success, or an
Issue on failure.annotations — optional filter-level annotations (expected message,
representation, arbitrary constraint hints).aborted — when true, parsing stops immediately after this filter
fails (no further checks run).Use .annotate() to add metadata and .abort() to mark as aborting.
Combine with another check via .and() to form a FilterGroup.
See
FilterGroupCheckisPatternSignature
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
) }
Since v4.0.0