enterprise-basics
Version:
A utility library for enterprise applications. It streamlines common business tasks by providing functions to process delimited and Excel files, generate professional PDFs, and handle email communications with attachments.
15 lines (14 loc) • 537 B
TypeScript
/**
* Asynchronously retrieves the value of an environment variable
* @param {string} key - The name of the environment variable to retrieve
* @returns {Promise<string>} A promise that resolves with the value of the environment variable
* @throws {Error} If the environment variable is not set, undefined, or null
* @example
* try {
* const value = await getEnvValue('API_KEY');
* console.log(value);
* } catch (error) {
* console.error(error);
* }
*/
export declare function getEnvValue(key: string): Promise<string>;