@types/dotenv-safe
TypeScript icon, indicating that this package has built-in type declarations

8.1.6 • Public • Published

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.

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

Credits

These definitions were written by Stan Goldmann.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
8.1.629,591ts5.8
8.1.629,591ts5.7
8.1.629,591latest
8.1.629,591ts4.6
8.1.629,591ts4.7
8.1.629,591ts4.8
8.1.629,591ts4.9
8.1.629,591ts5.0
8.1.629,591ts5.1
8.1.629,591ts5.2
8.1.629,591ts5.3
8.1.629,591ts5.4
8.1.629,591ts5.5
8.1.629,591ts5.6
8.1.629,591ts5.9
8.1.215,729ts3.6
8.1.215,729ts3.7
8.1.215,729ts3.8
8.1.215,729ts3.9
8.1.215,729ts4.0
8.1.215,729ts4.1
8.1.215,729ts4.2
8.1.215,729ts4.3
8.1.215,729ts4.4
8.1.55,622ts4.5
8.1.14,318ts3.0
8.1.14,318ts3.1
8.1.14,318ts3.2
8.1.14,318ts3.3
8.1.14,318ts3.4
8.1.14,318ts3.5
8.1.0925ts2.8
8.1.0925ts2.9
5.0.4312ts2.3
5.0.4312ts2.4
5.0.4312ts2.5
5.0.4312ts2.6
5.0.4312ts2.7
5.0.4312ts2.2
5.0.383ts2.0
5.0.383ts2.1

Version History

VersionDownloads (Last 7 Days)Published
8.1.629,591
8.1.55,622
8.1.4231
8.1.3320
8.1.215,729
8.1.14,318
8.1.0925
5.0.4312
5.0.383
5.0.24
5.0.13
5.0.05
4.0.146
4.0.044

Package Sidebar

Install

npm i @types/dotenv-safe

Weekly Downloads

57,233

Version

8.1.6

License

MIT

Unpacked Size

5.24 kB

Total Files

5

Last publish

Collaborators

  • types