# Installation
> `npm install --save @types/dotenv-safe`

# Summary
This package contains type definitions for dotenv-safe (https://github.com/rolodato/dotenv-safe).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dotenv-safe.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dotenv-safe/index.d.ts)
````ts
import dotenv = require("dotenv");

export interface MissingEnvVarsError extends Error {
    /**
     * Path to example environment file.
     */
    sample: string;

    /**
     * Variables which existing in the sample file, but not in the loaded file.
     */
    missing: string[];
}

export interface DotenvSafeOptions extends dotenv.DotenvConfigOptions {
    /**
     * Path to environment file.
     * @default ".env"
     */
    path?: string | undefined;

    /**
     * Path to example environment file. (Option 1)
     * @default ".env.example"
     */
    example?: string | undefined;

    /**
     * Path to example environment file. (Option 2 -- example takes precedence)
     * @default ".env.example"
     */
    sample?: string | undefined;

    /**
     * Enabling this option will not throw an error after loading.
     * @default false
     */
    allowEmptyValues?: boolean | undefined;
}

export interface DotenvSafeConfigOutput extends dotenv.DotenvConfigOutput {
    /**
     * key-value pairs required by .env.example
     */
    required: dotenv.DotenvParseOutput;
}

/**
 * Loads environment variables file into 'process.env'.
 *
 * @throws MissingEnvVarsError
 */
export function config(options?: DotenvSafeOptions): DotenvSafeConfigOutput;

````

### Additional Details
 * Last updated: Sun, 18 Feb 2024 12:39:49 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [dotenv](https://npmjs.com/package/dotenv)

# Credits
These definitions were written by [Stan Goldmann](https://github.com/krenor).
