variable / @typed/fx/Sink

skipInterrupt

Suppresses failure causes made entirely of interruption reasons.

Package version
2.0.0-beta.7
Category
Failure handling
Since
1.0.0

Import

import { skipInterrupt } from "@typed/fx/Sink";

Signatures

export declare const skipInterrupt: <A, E, R>(sink: Sink<A, E, R>) => Sink<A, E, R>;

Why

Some terminal consumers treat expected cancellation as silent completion while still needing typed failures and defects.

Ownership and lifetime

Successes pass through unchanged. A pure interruption Cause invokes no downstream callback; mixed or non-interruption causes are preserved. The adapter does not change fiber ownership or cleanup and acquires no resources.

Examples

import { Effect } from "effect"
import * as Sink from "@typed/fx/Sink"
const quietCancellation = Sink.skipInterrupt(Sink.make(Effect.logError, Effect.log))

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source