effect-io-ai

Package: effect
Module: Effect

Effect.bindTo

Gives a name to the success value of an Effect, creating a single-key record used in do notation pipelines.

When to use

Use to start a do-notation pipeline from an existing Effect when its success value should become the first named field in the accumulated record.

See

Signature

declare const bindTo: { <N extends string>(name: N): <A, E, R>(self: Effect<A, E, R>) => Effect<{ [K in N]: A; }, E, R>; <A, E, R, N extends string>(self: Effect<A, E, R>, name: N): Effect<{ [K in N]: A; }, E, R>; }

Source

Since v2.0.0