effect-io-ai

Package: effect
Module: Request

Request.completeEffect

Completes a request entry with the result of an effect.

When to use

Use to finish a Request.Entry by running an effect whose success or typed failure should become the request result.

Details

If the effect succeeds, the entry is completed successfully with its value. If the effect fails, the entry is completed with that failure.

Gotchas

The returned effect itself does not fail with the request error.

See

Signature

declare const completeEffect: { <A extends Any, R>(effect: Effect.Effect<Success<A>, Error<A>, R>): (self: Entry<A>) => Effect.Effect<void, never, R>; <A extends Any, R>(self: Entry<A>, effect: Effect.Effect<Success<A>, Error<A>, R>): Effect.Effect<void, never, R>; }

Source

Since v2.0.0