Package: effect
Module: Cause
Returns true if the cause contains at least one Fail reason.
When to use
Use to check whether a cause includes typed failures before extracting, mapping, or rendering them.
Example (Checking for typed errors)
import { Cause } from "effect"
console.log(Cause.hasFails(Cause.fail("error"))) // true
console.log(Cause.hasFails(Cause.die("defect"))) // false
See
hasDies — check for defectshasInterrupts — check for interruptionsSignature
declare const hasFails: <E>(self: Cause<E>) => boolean
Since v4.0.0