DefinitelyTyped/dotenv/dotenv-tests.ts
Borek Bernard 562df78122 Fix return type of config(), add documentation (#12347)
* Fixed return type of `config()`, doc comments added

* Returned the original author name
2016-11-03 09:04:34 +09:00

20 lines
302 B
TypeScript

import dotenv = require('dotenv');
// typically, result will be an Object
let env = dotenv.config({
silent: true
});
// ... but it might also be `false`
let result = dotenv.config({
path: '.non-existing-env'
});
dotenv.config({
path: '.env'
});
dotenv.config({
encoding: 'utf8'
});