effect-io-ai

Package: effect
Module: Config

Config.succeed

Creates a config that always succeeds with the given value, ignoring the provider entirely.

When to use

Use when you need a hardcoded config value, such as inside orElse or tests.

Example (Returning a constant fallback)

import { Config } from "effect"

const host = Config.string("HOST").pipe(
  Config.orElse(() => Config.succeed("localhost"))
)

Signature

declare const succeed: <T>(value: T) => Config<T>

Source

Since v2.0.0