/** * YAML Parser with Environment Variable Interpolation * * Parses YAML config files and replaces environment variable references. * * Supported formats: * - ${VAR_NAME} - Required variable (returns error if not set) * - ${VAR_NAME:-default} - Optional variable with default value */ import { type ConfigResult } from './result.js'; /** * Interpolates environment variables in a string * * @param value - String potentially containing env var references * @returns Result containing string with env vars replaced, or error if required var is not set * * @example * interpolateEnvVars('${LOG_LEVEL:-info}') // ok('info') if LOG_LEVEL not set * interpolateEnvVars('${SERVICE_NAME}') // err(missingEnvVar(...)) if SERVICE_NAME not set */ export declare function interpolateEnvVars(value: string): ConfigResult; /** * Recursively interpolates environment variables in an object * * @param obj - Object potentially containing env var references in string values * @returns Result containing object with all string values interpolated, or error */ export declare function interpolateObject(obj: any): ConfigResult; /** * Parses YAML string and interpolates environment variables * * @param yamlContent - Raw YAML string * @returns Result containing parsed and interpolated object, or error * * @example * const result = parseYamlWithEnv(` * service: * name: \${SERVICE_NAME} * environment: \${NODE_ENV:-development} * `) * if (result.ok) { * const config = result.value * } */ export declare function parseYamlWithEnv(yamlContent: string): ConfigResult; //# sourceMappingURL=parser.d.ts.map