Package: effect
Module: Exit
Creates a failed Exit representing fiber interruption.
When to use
Use to signal that a fiber was interrupted.
Details
Optionally pass a fiber ID to identify which fiber was interrupted. Returns
a Failure<never> with an Interrupt cause.
Example (Creating an interruption Exit)
import { Exit } from "effect"
const exit = Exit.interrupt(123)
console.log(Exit.isFailure(exit)) // true
console.log(Exit.hasInterrupts(exit)) // true
See
hasInterrupts to check whether an Exit contains interruptionsSignature
declare const interrupt: (fiberId?: number | undefined) => Exit<never>
Since v2.0.0