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
Member of
Sink

Import

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

Access Sink.mapInput 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 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