export declare class EnvParser { /** * Cache Map for environment variables to speed up retrieval due to system calls being slower than retrieving from memory. * Populated in the following scenarios: * - When {@link Config.refreshEnvCache} is called * - When {@link Config.setEnvValue} is called */ private static envCache; /** * Clears the environment variable cache and updates the cache with the most up-to-date environment variables */ static refreshCache(): void; /** * Removes all elements from the cache. */ static clearCache(): void; /** * Sets a new value to an environment variable and writes-through the value to the cache. * @param key Key of the environment variable. * @param value The value to set the environment variable to. */ static setValue(key: string, value: string): void; /** * Deletes an environment variable and removes it from the cache. * @param key Key or name of the environment variable. */ static deleteValue(key: string): void; /** * Returns the value corresponding the to environment variable with name {@link key} in the environment variables. * Checks the {@link envCache} first and then process.env if there is a cache miss. Will lazy load the value into * the in-memory cache if there is a miss. Caches undefined environment variables as well. * @param key Key of the environment variable. * @returns The value corresponding the to environment variable with name {@link key} in the environment variables. */ private static getValue; /** * Gets the specified environment variable and returns it as a plain string with no type conversions. * @param key The name of the environment variable. * @returns The value of the environment variable. * @throws {UndefinedEnvVarError} Error thrown if the environment variable is not defined. */ static getString(key: string): string; /** * Gets the specified environment variable and returns it as a number. * @param key The name of the environment variable. * @returns The value of the environment variable as a number. */ static getNumber(key: string): number; /** * Gets the specified environment variable and returns it as a boolean. * @param key The name of the environment variable. * @returns The value of the environment variable as a boolean. */ static getBoolean(key: string): boolean; /** * Gets the specified environment variable and returns it as a date. * @param key The name of the environment variable. * @returns The value of the environment variable as a date. */ static getDate(key: string): Date; /** * Gets the specified environment variable and returns it as a RegExp. * @param key The name of the environment variable. * @returns The value of the environment variable as a RegExp. */ static getRegExp(key: string): RegExp; /** * Gets the specified environment variable and returns it as an object. * @param key The name of the environment variable. * @returns The value of the environment variable as an object. */ static getObject(key: string): object; /** * Gets the specified environment variable and returns it as an Array. * If the type is ommitted each element will default to type string when conversion occurs. * @param key The name of the environment variable. * @returns The value of the environment variable as an Array. */ static getArray(key: string, type?: string): Array; /** * Gets the specified environment variable and returns it as a Set. * If the type is ommitted each element will default to string when conversion occurs. * @param key The name of the environment variable. * @returns The value of the environment variable as a Set. */ static getSet(key: string, type?: string): Set; /** * Gets the specified environment variable and returns it as a Map. * If the keyType and valueType are ommitted the keys and will default to type string when conversion occurs. * @param key The name of the environment variable. * @returns The value of the environment variable as a Map. */ static getMap(key: string, keyType?: string, valueType?: string): Map; } export default EnvParser;