Package: effect
Module: Effect
Returns an effect that is immediately interrupted.
Example (Creating an interrupted effect)
import { Effect } from "effect"
const program = Effect.gen(function*() {
return yield* Effect.interrupt
yield* Effect.succeed("This won't execute and is unreachable")
})
Effect.runPromise(program).catch(console.error)
// Throws: InterruptedException
Signature
declare const interrupt: Effect<never, never, never>
Since v2.0.0