diff --git a/dotenv/dotenv-tests.ts b/dotenv/dotenv-tests.ts new file mode 100644 index 0000000000..555c104c96 --- /dev/null +++ b/dotenv/dotenv-tests.ts @@ -0,0 +1,15 @@ +/// + +import dotenv = require('dotenv'); + +dotenv.config({ + silent: true +}); + +dotenv.config({ + path: '.env' +}) + +dotenv.config({ + encoding: 'utf8' +}) \ No newline at end of file diff --git a/dotenv/dotenv.d.ts b/dotenv/dotenv.d.ts new file mode 100644 index 0000000000..b18e9bd03b --- /dev/null +++ b/dotenv/dotenv.d.ts @@ -0,0 +1,14 @@ +// Type definitions for dotenv 2.0.0 +// Project: https://github.com/motdotla/dotenv +// Definitions by: Jussi Kinnula +// Definitions: https://github.com/jussikinnula/DefinitelyTyped + +interface dotenvOptions { + silent?: boolean; + path?: string; + encoding?: string; +} + +declare module 'dotenv' { + export function config(options?: dotenvOptions): boolean; +}