import { TimeSpan } from '../conversion/TimeSpan'; /** * Returns whether the specified environment variable is defined.\ * **NOTE**: Even if the variable is assigned a value of '', it is considered defined. * @param name The name of the variable to test. * @returns true if the variable is defined; false otherwise. */ export declare function isVariableDefined(name: string): boolean; /** * Gets the value of the specified environment variable. If the environment variable is not defined, * the behavior depends on whether a defaultValue parameter is provided: * - If defaultValue is provided, that value is returned. * - If defaultValue is not provided, a [[MissingEnvironmentVariableError]] is thrown. * @param name The name of the environment variable to retrieve. * @param defaultValue The value to be returned if the requested environment variable does not exist. * @returns The value of the requested environment variable or defaultValue. * @throws [[MissingEnvironmentVariableError]] if the requested environment variable is not defined * and defaultValue is not provided. */ export declare function getVariable(name: string, defaultValue?: string): string; /** * Gets the value of the specified environment variable as a boolean. If the environment variable is not * defined, the behavior depends on whether a defaultValue parameter is provided: * - If defaultValue is provided, that value is returned. * - If defaultValue is not provided, a [[MissingEnvironmentVariableError]] is thrown. * @param name The name of the environment variable to retrieve. * @param defaultValue The value to be returned if the requested environment variable does not exist. * @returns The value of the requested environment variable or defaultValue. * @throws [[MissingEnvironmentVariableError]] if the requested environment variable is not defined and * defaultValue is not provided. * @throws [[InvalidEnvironmentVariableError]] if the environment variable exists, but cannot be converted * to a boolean. */ export declare function getVariableAsBoolean(name: string, defaultValue?: boolean): boolean; /** * Gets the value of the specified environment variable as a number. If the environment variable is not * defined, the behavior depends on whether a defaultValue parameter is provided:\ * - If defaultValue is provided, that value is returned.\ * - If defaultValue is not provided, a [[MissingEnvironmentVariableError]] is thrown. * @param name The name of the environment variable to retrieve. * @param defaultValue The value to be returned if the requested environment variable does not exist. * @returns The value of the requested environment variable or defaultValue. * @throws [[MissingEnvironmentVariableError]] if the requested environment variable is not defined and * defaultValue is not provided. * @throws [[InvalidEnvironmentVariableError]] if the environment variable exists, but cannot be converted * to a number. */ export declare function getVariableAsNumber(name: string, defaultValue?: number): number; /** * Gets the value of the specified environment variable as a [[TimeSpan]]. * @param name The name of the environment variable to retrieve. * @param defaultValue The value to be returned if the requested environment variable does not exist. * @returns The value of the requested environment variable or defaultValue. * @throws [[MissingEnvironmentVariableError]] if the requested environment variable is not defined and * defaultValue is not provided. * @throws [[InvalidEnvironmentVariableError]] if the environment variable exists, but cannot be converted * to a TimeSpan. */ export declare function getVariableAsTimeSpan(name: string, defaultValue?: TimeSpan): TimeSpan;