| 3174 | * @since 4.0.0 |
| 3175 | */ |
| 3176 | export 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 |
nothing calls this directly
no outgoing calls
no test coverage detected