From 3dba657aa09f520072e02769f64b4ca026b9170e Mon Sep 17 00:00:00 2001 From: Jussi Kinnula Date: Mon, 21 Mar 2016 15:01:49 +0200 Subject: [PATCH 1/2] Add dotenv --- dotenv/dotenv-tests.ts | 15 +++++++++++++++ dotenv/dotenv.d.ts | 14 ++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 dotenv/dotenv-tests.ts create mode 100644 dotenv/dotenv.d.ts 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..f0633e88f8 --- /dev/null +++ b/dotenv/dotenv.d.ts @@ -0,0 +1,14 @@ +// Type definitions for dotenv 2.0.0 +// Project: https://github.com/bkeepers/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; +} From 822864b08cee6821527183b097ba996c715641b5 Mon Sep 17 00:00:00 2001 From: Jussi Kinnula Date: Sun, 27 Mar 2016 16:16:27 +0300 Subject: [PATCH 2/2] dotenv: Use correct GitHub link --- dotenv/dotenv.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotenv/dotenv.d.ts b/dotenv/dotenv.d.ts index f0633e88f8..b18e9bd03b 100644 --- a/dotenv/dotenv.d.ts +++ b/dotenv/dotenv.d.ts @@ -1,5 +1,5 @@ // Type definitions for dotenv 2.0.0 -// Project: https://github.com/bkeepers/dotenv +// Project: https://github.com/motdotla/dotenv // Definitions by: Jussi Kinnula // Definitions: https://github.com/jussikinnula/DefinitelyTyped