effect-io-ai

Package: effect
Module: Channel

Channel.toTransform

Converts a Channel back to its underlying transformation function.

Example (Extracting channel transforms)

import { Channel } from "effect"

const channel = Channel.succeed(42)
const transform = Channel.toTransform(channel)
// transform can now be used directly

Signature

declare const toTransform: <OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>(channel: Channel<OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>) => (upstream: Pull.Pull<InElem, InErr, InDone>, scope: Scope.Scope) => Effect.Effect<Pull.Pull<OutElem, OutErr, OutDone>, never, Env>

Source

Since v4.0.0