Package: effect
Module: Config
Creates a config that only accepts one of the specified literal values.
When to use
Use to restrict a config to a fixed set of allowed literal values.
Details
Shortcut for Config.schema(Schema.Literals(literals), name).
Example (Restricting to a set of literals)
import { Config } from "effect"
const env = Config.literals(["development", "production"], "ENV")
See
literal for accepting one specific literal valueSignature
declare const literals: <const L extends ReadonlyArray<SchemaAST.LiteralValue>>(literals: L, name?: string) => Config<L[number]>
Since v4.0.0