Skip to main content

Function: getEnvVar()

getEnvVar<K>(key: K): undefined | KnownEnvironmentVariables[K]

Defined in: shared/utils/environment.ts:28

Type-safe environment variable access utility. Avoids index signature issues with process.env.

Type Parametersโ€‹

Kโ€‹

K extends keyof KnownEnvironmentVariables

Parametersโ€‹

keyโ€‹

K

The environment variable key to access

Returnsโ€‹

undefined | KnownEnvironmentVariables[K]

The environment variable value or undefined