Import
import { mapError } from "@typed/fx/Push";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.