Package: effect
Module: Exit
Checks whether an Exit is a Failure.
When to use
Use as a type guard to narrow Exit<A, E> to Failure<A, E> and access the
cause property.
Example (Narrowing to failure)
import { Exit } from "effect"
const exit = Exit.fail("error")
if (Exit.isFailure(exit)) {
console.log(exit.cause)
}
See
isSuccess for the opposite checkmatch for exhaustive pattern matchingSignature
declare const isFailure: <A, E>(self: Exit<A, E>) => self is Failure<A, E>
Since v2.0.0