effect-io-ai

Package: effect
Module: Filter

Filter.boolean

A predefined filter that only passes through boolean values.

When to use

Use when accepting an unknown input only if it is already a boolean and you want a Filter result rather than a plain predicate result.

Details

Implemented with fromPredicate(Predicate.isBoolean), so true and false succeed and non-booleans fail with the original input.

See

Signature

declare const boolean: Filter<unknown, boolean, unknown>

Source

Since v4.0.0