Types Module
Reusable configuration types and utilities. This module contains generic types for building type-safe configuration systems.
Types and nested modules
| Type/Module | Description |
Helpers for extracting typed values from ConfigValue. Use these with a `read` function that returns ConfigValue option: let port = read PORT |> ConfigValue.int let apiKey = read XAI_API_KEY |> ConfigValue.stringOption |
|
|
Whether a configuration variable is required for the app to start |
|
|
Parsed configuration value with its type |
|
|
The runtime type of a configuration variable's value |
|
|
Core definition of a config variable (enough to read, parse, validate) |
|
|
Documentation metadata for a config variable |
|
|
How a configuration variable gets its value |
Functions and values
| Function or value |
Description
|
Full Usage:
parseBool s
Parameters:
string
Returns: bool option
|
Parse a string as a boolean value Accepts: "true", "false", "1", "0" (case-insensitive, trimmed)
|
Full Usage:
parseValue valueType rawValue
Parameters:
ConfigValueType
rawValue : string
Returns: Result<ConfigValue, string>
|
Parse a string value into the expected type.
|
UnionConfig