Package: effect
Module: Config
Creates a config that only accepts a specific literal value.
When to use
Use to restrict a config to a single, specific literal value.
Details
Shortcut for Config.schema(Schema.Literal(literal), name).
Example (Restricting to a literal)
import { Config } from "effect"
const env = Config.literal("production", "ENV")
See
literals – accepts multiple literal valuesSignature
declare const literal: <L extends SchemaAST.LiteralValue>(literal: L, name?: string) => Config<L>
Since v2.0.0