motdotla / dotenv

Loads environment variables from .env for nodejs projects.
https://www.dotenvx.com
BSD 2-Clause "Simplified" License
19.18k stars 859 forks source link

DotenvConfigOptions interface missing new processEnv field #755

Closed JstnMcBrd closed 1 year ago

JstnMcBrd commented 1 year ago

TypeScript gives the following error when trying to use the new processEnv option: image

I believe this is because the interface for DotenvConfigOptions in main.d.ts does not include the processEnv field yet.

Until this is fixed, simply asserting the type is a valid workaround. image

motdotla commented 1 year ago

Thank you. Repairing this now. The new DOTENV_KEY option is also missing from the type file.

motdotla commented 1 year ago

A couple examples added here:

Released as 16.3.1

motdotla commented 1 year ago

https://github.com/motdotla/dotenv/pull/756

https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md#1631-2023-06-17