stack

Home > @infiniteobjects/core-library-node > Environment > getOrThrow

Environment.getOrThrow() method

Gets the environment key casted to a primitive or throws an error

Signature:

static getOrThrow(key: string): string | boolean | number | null;

Parameters

Parameter Type Description
key string  

Returns:

string | boolean | number | null

Exceptions

if the key does not exist in the environment