Package: effect
Module: Exit
Checks whether an unknown value is an Exit.
When to use
Use to validate unknown values at system boundaries and narrow them to
Exit<unknown, unknown>.
Details
Does not inspect the contents of the Exit. Returns true for both Success
and Failure exits.
Example (Checking if a value is an Exit)
import { Exit } from "effect"
console.log(Exit.isExit(Exit.succeed(42))) // true
console.log(Exit.isExit(Exit.fail("err"))) // true
console.log(Exit.isExit("not an exit")) // false
See
isSuccess to check for a successful ExitisFailure to check for a failed ExitSignature
declare const isExit: (u: unknown) => u is Exit<unknown, unknown>
Since v2.0.0