effect-io-ai

Package: effect
Module: Filter

Filter.toResult

Converts a Filter into a function that returns the underlying Result.Result for each input.

When to use

Use to adapt a Filter to APIs that expect a plain function returning Result, while preserving both the pass value and the failure value.

See

Signature

declare const toResult: <A, Pass, Fail>(self: Filter<A, Pass, Fail>) => (input: A) => Result.Result<Pass, Fail>

Source

Since v4.0.0