Check<T>A validation check — either a single Filter or a composite FilterGroup.
Details
Stored in the Checks array on Base.checks.
Source effect/SchemaAST.ts:29891 lines
export type type Check<T> = Filter<T> | FilterGroup<T>Check<function (type parameter) T in type Check<T>T> = class Filter<in E>class Filter {
_tag: 'Filter';
run: (input: E, self: AST, options: ParseOptions) => SchemaIssue.Issue | undefined;
annotations: Schema.Annotations.Filter | undefined;
aborted: boolean;
annotate: (annotations: Schema.Annotations.Filter) => Filter<E>;
abort: () => Filter<E>;
and: (other: Check<E>, annotations?: Schema.Annotations.Filter) => FilterGroup<E>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
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 metadata (expected message, meta
tags, 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
.
Filter<function (type parameter) T in type Check<T>T> | class FilterGroup<in E>class FilterGroup {
_tag: 'FilterGroup';
checks: readonly [Check<E>, ...Array<Check<E>>];
annotations: Schema.Annotations.Filter | undefined;
annotate: (annotations: Schema.Annotations.Filter) => FilterGroup<E>;
and: (other: Check<E>, annotations?: Schema.Annotations.Filter) => FilterGroup<E>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
FilterGroup<function (type parameter) T in type Check<T>T>Referenced by 13 symbols