MCPcopy Create free account
hub / github.com/Effect-TS/effect / FilterGroup

Class FilterGroup

packages/effect/src/SchemaAST.ts:3176–3196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3174 * @since 4.0.0
3175 */
3176export class FilterGroup<in E> extends Pipeable.Class {
3177 readonly _tag = "FilterGroup"
3178 readonly checks: readonly [Check<E>, ...Array<Check<E>>]
3179 readonly annotations: Schema.Annotations.Filter | undefined
3180
3181 constructor(
3182 checks: readonly [Check<E>, ...Array<Check<E>>],
3183 annotations: Schema.Annotations.Filter | undefined = undefined
3184 ) {
3185 super()
3186 this.checks = checks
3187 this.annotations = annotations
3188 }
3189 annotate(annotations: Schema.Annotations.Filter): FilterGroup<E> {
3190 return new FilterGroup(this.checks, { ...this.annotations, ...annotations })
3191 }
3192 and(other: Check<E>, annotations?: Schema.Annotations.Filter): FilterGroup<E>
3193 and(other: Check<E>, annotations?: Schema.Annotations.Filter): FilterGroup<E> {
3194 return new FilterGroup([this, other], annotations)
3195 }
3196}
3197
3198/**
3199 * A validation check — either a single {@link Filter} or a composite

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected