import { type Config } from './config.js'; /** * Describes how one environment variable maps onto a nested config path. */ export interface EnvMapEntry { path: string; coerce?: 'number' | 'boolean'; } /** * Default mapping of env var → config path. Extensible per-call by passing * `envMap` to `loadConfig`. No implicit `process.env` access happens * anywhere in this module — callers must pass `env` explicitly. */ export declare const ENV_MAP: Record; export interface LoadConfigOptions { /** * Optional path to a JSON config file. Values from the file override * built-in defaults but are overridden by env values. */ filePath?: string; /** * Optional env source (typically `process.env` in production; a literal * object in tests; runtime-specific shape in Workers/Convex). Pass * undefined to skip env reading entirely. */ env?: Record; /** * Optional override for the env-var → config-path mapping. Defaults to * the exported ENV_MAP. */ envMap?: Record; } /** * Returns just the built-in default configuration, no file or env applied. */ export declare function getDefaultConfig(): Config; /** * Reads a JSON file and returns its parsed contents. Throws if the file * cannot be read or does not contain a JSON object. */ export declare function loadConfigFromFile(filePath: string): Record; /** * Extracts config values from an env-like object using the supplied map. * Numeric and boolean env values are coerced; coercion failures throw with * an explicit message. */ export declare function loadConfigFromEnv(env: Record, map?: Record): Record; /** * The main entry point. Composes defaults → file → env, validates the * result against ConfigSchema, and returns a deep-frozen Config. */ export declare function loadConfig(opts?: LoadConfigOptions): Config; //# sourceMappingURL=load-config.d.ts.map