import { ConfigRecord, Environment, EnvironmentConfig as EnvironmentConfigType } from './types'; /** * Detect the current environment. */ export declare function detectEnvironment(): Environment; /** * Check if running in development. */ export declare function isDevelopment(): boolean; /** * Check if running in production. */ export declare function isProduction(): boolean; /** * Check if running in staging. */ export declare function isStaging(): boolean; /** * Check if running in test. */ export declare function isTest(): boolean; /** * Check if running in browser. */ export declare function isBrowser(): boolean; /** * Check if running on server. */ export declare function isServer(): boolean; /** * Manager for environment-specific configuration. */ export declare class EnvironmentConfigManager { private environment; private merger; constructor(environment?: Environment); /** * Get the current environment. */ getEnvironment(): Environment; /** * Set the environment (for testing). */ setEnvironment(env: Environment): void; /** * Resolve configuration with environment overrides. */ resolve(baseConfig: T, envOverrides: EnvironmentConfigType): T; /** * Get environment-specific value. */ select(options: { [K in Environment]?: V; } & { default: V; }): V; /** * Create environment-aware configuration factory. */ createFactory(factory: (env: Environment) => C): () => C; } /** * Common configuration defaults per environment. */ export declare const environmentDefaults: Record>; /** * Get environment defaults. */ export declare function getEnvironmentDefaults(env?: Environment): Partial; /** * Get an environment variable with type coercion. */ export declare function getEnvVar(name: string, defaultValue?: string): string | undefined; /** * Get a required environment variable. */ export declare function requireEnvVar(name: string): string; /** * Get an environment variable as a number. */ export declare function getEnvVarAsNumber(name: string, defaultValue: number): number; /** * Get an environment variable as a boolean. */ export declare function getEnvVarAsBoolean(name: string, defaultValue: boolean): boolean; /** * Get an environment variable as JSON. */ export declare function getEnvVarAsJson(name: string, defaultValue: T): T; /** * Get an environment variable as an array. */ export declare function getEnvVarAsArray(name: string, defaultValue?: string[], separator?: string): string[]; /** * Get the singleton environment config manager. */ export declare function getEnvironmentConfig(): EnvironmentConfigManager; /** * Reset the singleton instance. */ export declare function resetEnvironmentConfig(): void;