Import
import { Sink } from "@typed/fx";Access Sink.mapError 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 function mapError<A, E, E2, R>(sink: Sink<A, E2, R>, f: (e: E) => E2): Sink<A, E, R>;Why
A producer’s typed error can be translated into the vocabulary expected by an existing consumer without losing Cause structure.
Ownership and lifetime
Mapping is synchronous and resource-free. Success order is unchanged; only Fail reasons are
mapped, while defects and interruption reasons pass through untouched.
Examples
import { Effect } from "effect"
import * as Sink from "@typed/fx/Sink"
const target: Sink.Sink<number, string> = Sink.make(Effect.logError, Effect.log)
const acceptsNumbers = Sink.mapError(target, (error: number) => `code:${error}`)Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.