variable / @typed/fx

Sink.exit

Materializes both sink channels as successful Effect Exit values.

Package version
2.0.0-beta.13
Category
Failure handling
Since
1.0.0
Member of
Sink

Import

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

Access Sink.exit through the imported Sink export. Its declaration below describes the member.

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

Signatures

export declare const exit: <A, E, R>(sink: Sink<Exit.Exit<A, E>, never, R>) => ExitSink<A, E, R>;

Why

A single infallible consumer can record or inspect success and the complete failure Cause as data.

Ownership and lifetime

Every input produces exactly one downstream success: Exit.succeed for values or Exit.failCause for failures. Order is preserved and the adapter acquires no resources.

Examples

import { Effect } from "effect"
import * as Sink from "@typed/fx/Sink"
const exits = Sink.exit(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