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
| Interface | Description |
|---|---|
| ConfigEnumOptions | Options for creating a string enum/union configuration item. |
Type Aliases
| Type Alias | Description |
|---|---|
| ConfigItem | Base schema type for individual config items |
| ConfigSchema | Top-level schema type that can contain both individual items and named sections. |
| ConfigSection | Schema for nested sections |
| InferConfigType | Extracts 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
| Function | Description |
|---|---|
| configEnum | Helper for creating type-safe enum/union config items. Automatically handles the Zod type for string enums. |
| configItem | Creates a type-safe configuration item. This helper provides better type inference and makes the schema more readable. |
| configSection | Creates a configuration section with multiple related items. Sections help organize configuration into logical groups. |