Import
import { Push } from "@typed/fx";Access Push.mapError through the imported Push 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 mapError: {
<E2, E3>(f: (e: E2) => E3): <A, E, R, B, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, B, E3, R2>;
<A, E, R, B, E2, R2, E3>(push: Push<A, E, R, B, E2, R2>, f: (e: E2) => E3): Push<A, E, R, B, E3, R2>;
};Why
Normalize an output failure type at the observation boundary without touching input errors or collapsing defects and interruption into typed failures.
Ownership and lifetime
The mapping is synchronous and resource-free. It runs when the output Cause is delivered and preserves the upstream subscription, Scope, interruption, and cleanup behavior.
Examples
import { Effect } from "effect"
import * as Fx from "@typed/fx/Fx"
import * as Push from "@typed/fx/Push"
import * as Sink from "@typed/fx/Sink"
const push = Push.make(Sink.make(() => Effect.void, (_: string) => Effect.void), Fx.fail("offline"))
const normalized = Push.mapError(push, (message) => ({ message }))Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.