effect-io-ai

Package: effect
Module: Effect

Effect.succeed

Creates an Effect that always succeeds with a given value.

When to Use

Use this function when you need an effect that completes successfully with a specific value without any errors or external dependencies.

Example (Creating a Successful Effect)

import { Effect } from "effect"

// Creating an effect that represents a successful scenario
//
//      ┌─── Effect<number, never, never>
//      ▼
const success = Effect.succeed(42)

See

Signature

declare const succeed: <A>(value: A) => Effect<A>

Source

Since v2.0.0