Hyperlinkv0.8.0-beta.28

Pull

Pull.filterDoneVoidconsteffect/Pull.ts:251
<E extends Cause.Done>(input: Cause.Cause<E>): Result.Result<
  Cause.Done,
  Cause.Cause<Exclude<E, Cause.Done>>
>

Finds a Cause.Done failure in a cause whose done value is not used.

When to use

Use to detect Cause.Done completion in a Cause when the completion value is not part of the downstream logic.

Details

Returns a successful Result with the done marker when present, otherwise returns a failed Result with the non-done cause.

Source effect/Pull.ts:2516 lines
export const filterDoneVoid: <E extends Cause.Done>(
  input: Cause.Cause<E>
) => Result.Result<Cause.Done, Cause.Cause<Exclude<E, Cause.Done>>> = Filter.composePassthrough(
  Cause.findError,
  (e) => Cause.isDone(e) ? Result.succeed(e) : Result.fail(e)
) as any