Skip to content

schema

Schema type definitions and builder helpers for declaring ConfigBound schemas.

These are the building blocks for describing what your configuration looks like. Import them from @config-bound/core (re-exported) or directly from @config-bound/core/schema when you only need the types and helpers.

Interfaces

InterfaceDescription
ConfigEnumOptionsOptions for creating a string enum/union configuration item.

Type Aliases

Type AliasDescription
ConfigItemBase schema type for individual config items
ConfigSchemaTop-level schema type that can contain both individual items and named sections.
ConfigSectionSchema for nested sections
InferConfigTypeExtracts the runtime config shape from a schema. Top-level ConfigItem values are grouped under the app section, while ConfigSection values remain as their own named sections.

Functions

FunctionDescription
configEnumHelper for creating type-safe enum/union config items. Automatically handles the Zod type for string enums.
configItemCreates a type-safe configuration item. This helper provides better type inference and makes the schema more readable.
configSectionCreates a configuration section with multiple related items. Sections help organize configuration into logical groups.