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