effect-io-ai

Package: effect
Module: Pull

Pull.doneExitFromCause

Converts a Cause into an Exit, treating Cause.Done as successful completion.

When to use

Use to produce an Exit for finalizing a low-level pull workflow when a Cause.Done signal should be treated as success and any remaining cause should fail.

Details

If the cause contains a done value, that leftover becomes the successful value. Otherwise the non-done cause becomes the failure cause.

See

Signature

declare const doneExitFromCause: <E>(cause: Cause.Cause<E>) => Exit.Exit<Cause.Done.Extract<E>, ExcludeDone<E>>

Source

Since v4.0.0