effect-io-ai

Package: effect
Module: Channel

Channel.bindTo

Wraps each output element in an object under the specified field name.

When to use

Use when you need to start a Channel Do-notation chain from an existing output value by assigning that value to a field name.

See

Signature

declare const bindTo: { <N extends string>(name: N): <OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>(self: Channel<OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>) => Channel<{ [K in N]: OutElem; }, OutErr, OutDone, InElem, InErr, InDone, Env>; <OutElem, OutErr, OutDone, InElem, InErr, InDone, Env, N extends string>(self: Channel<OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>, name: N): Channel<{ [K in N]: OutElem; }, OutErr, OutDone, InElem, InErr, InDone, Env>; }

Source

Since v4.0.0