Import
import { mapEffect } from "@typed/fx/Sink";Signatures
export declare const mapEffect: {
<B, A, E2, R2>(f: (b: B) => Effect.Effect<A, E2, R2>): <E, R>(sink: Sink<A, E | E2, R>) => Sink<B, E | E2, R | R2>;
<A, E, R, B, E2, R2>(sink: Sink<A, E | E2, R>, f: (b: B) => Effect.Effect<A, E2, R2>): Sink<B, E | E2, R | R2>;
};Why
Consumer-side adaptation can use services and typed failure without creating an intermediate Fx.
Ownership and lifetime
One transition Effect runs per callback invocation. Its success is forwarded once; its complete
failure Cause is sent to onFailure. Calls themselves are not serialized by this adapter, so
ordering follows the invoking producer. Services join the sink requirements; interruption is local
to each callback Effect.
Examples
import { Effect } from "effect"
import * as Sink from "@typed/fx/Sink"
const numbers = Sink.mapEffect(Sink.make(Effect.logError, Effect.log), (text: string) =>
Effect.succeed(Number(text)))Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.