Hyperlinkv0.8.0-beta.28

Config

Config.succeedfunctioneffect/Config.ts:872
<T>(value: T): Config<T>

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"))
)
constructorsorElse
Source effect/Config.ts:8723 lines
export function succeed<T>(value: T) {
  return make(() => Effect.succeed(value))
}
Referenced by 1 symbols