variable / @typed/fx/Sink

mapInput

Alias for map, named for the input-side direction of the transformation.

Package version
2.0.0-beta.13
Category
Transforming inputs
Since
1.0.0

Import

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

Signatures

export declare const mapInput: typeof map;

Why

mapInput makes contravariant Sink pipelines easier to read beside output-mapping APIs.

Ownership and lifetime

It is exactly map: synchronous, one-for-one, ordered, and resource-free.

Examples

import { Effect } from "effect"
import * as Sink from "@typed/fx/Sink"
const numbers = Sink.make(Effect.logError, (value: number) => Effect.log(value))
const strings = Sink.mapInput(numbers, Number)

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source