Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
40 lines
2.0 KiB
Plaintext
40 lines
2.0 KiB
Plaintext
/**
|
|
* Retrieves a number from an environment variable.
|
|
* - Returns `undefined` if the environment variable is empty, unset, contains only whitespace, or is not a number.
|
|
* - Returns a number in all other cases.
|
|
*
|
|
* @param {string} key - The name of the environment variable to retrieve.
|
|
* @returns {number | undefined} - The number value or `undefined`.
|
|
*/
|
|
export declare function getNumberFromEnv(key: string): number | undefined;
|
|
/**
|
|
* Retrieves a string from an environment variable.
|
|
* - Returns `undefined` if the environment variable is empty, unset, or contains only whitespace.
|
|
*
|
|
* @param {string} key - The name of the environment variable to retrieve.
|
|
* @returns {string | undefined} - The string value or `undefined`.
|
|
*/
|
|
export declare function getStringFromEnv(key: string): string | undefined;
|
|
/**
|
|
* Retrieves a boolean value from an environment variable.
|
|
* - Trims leading and trailing whitespace and ignores casing.
|
|
* - Returns `false` if the environment variable is empty, unset, or contains only whitespace.
|
|
* - Returns `false` for strings that cannot be mapped to a boolean.
|
|
*
|
|
* @param {string} key - The name of the environment variable to retrieve.
|
|
* @returns {boolean} - The boolean value or `false` if the environment variable is unset empty, unset, or contains only whitespace.
|
|
*/
|
|
export declare function getBooleanFromEnv(key: string): boolean;
|
|
/**
|
|
* Retrieves a list of strings from an environment variable.
|
|
* - Uses ',' as the delimiter.
|
|
* - Trims leading and trailing whitespace from each entry.
|
|
* - Excludes empty entries.
|
|
* - Returns `undefined` if the environment variable is empty or contains only whitespace.
|
|
* - Returns an empty array if all entries are empty or whitespace.
|
|
*
|
|
* @param {string} key - The name of the environment variable to retrieve.
|
|
* @returns {string[] | undefined} - The list of strings or `undefined`.
|
|
*/
|
|
export declare function getStringListFromEnv(key: string): string[] | undefined;
|
|
//# sourceMappingURL=environment.d.ts.map |