effect-io-ai

Package: effect
Module: Effectable

Effectable.Prototype

Create a low-level Effect prototype.

When to use

Use when you need to create a custom Effect-like value without extending a class, by providing a label and an evaluate function that receives the current fiber.

Details

When the effect is evaluated, it calls evaluate with the current fiber.

See

Signature

declare const Prototype: <A extends Effect.Effect<any, any, any>>(options: { readonly label: string; readonly evaluate: (this: A, fiber: Fiber.Fiber<any, any>) => Effect.Effect<Effect.Success<A>, Effect.Error<A>, Effect.Services<A>>; }) => Effect.Effect<Effect.Success<A>, Effect.Error<A>, Effect.Services<A>>

Source

Since v4.0.0