Package: effect
Module: Exit
Checks whether a failed Exit contains interruptions (Interrupt reasons).
When to use
Use to check whether an Exit contains fiber interruption.
Details
Returns false for successful exits. Only checks for Interrupt reasons in
the Cause. A Cause with only Fail or Die reasons returns false.
Example (Checking for interruptions)
import { Exit } from "effect"
console.log(Exit.hasInterrupts(Exit.interrupt(1))) // true
console.log(Exit.hasInterrupts(Exit.fail("err"))) // false
console.log(Exit.hasInterrupts(Exit.succeed(42))) // false
See
hasFails to check for typed errorshasDies to check for defectsSignature
declare const hasInterrupts: <A, E>(self: Exit<A, E>) => self is Failure<A, E>
Since v4.0.0