EnvironmentProvider

interface

Abstracts access to environment variables and the working directory.

The parser uses this interface for every process.env read/write and
process.cwd() call, which means consumers can supply a custom
implementation (e.g. an in-memory provider for browser playgrounds).

Methods

cwd(): string

Return the current working directory, used as the root for configuration-file resolution.

getEnv(key: string): string | undefined

Read an environment variable. Return `undefined` when the variable is not set.

setEnv(key: string, value: string): void

Write (or overwrite) an environment variable.