feat(dotenv-load): new definition (#45616)

* feat(dotenv-load): new definition

* Update index.d.ts

use `export = ` syntax instead of `export default`
This commit is contained in:
Sean LeBlanc 2020-06-21 00:48:21 -07:00 committed by GitHub
parent d5b7b77e1b
commit 09e9df2996
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,5 @@
import dotenvLoad from 'dotenv-load';
// tests
dotenvLoad();
dotenvLoad('test');

8
types/dotenv-load/index.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
// Type definitions for dotenv-load 2.0
// Project: https://github.com/formatlos/dotenv-load
// Definitions by: Sean S. LeBlanc <https://github.com/seleb>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function dotenvLoad(preloadEnv?: string): void;
export = dotenvLoad;

View File

@ -0,0 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true
},
"files": [
"index.d.ts",
"dotenv-load-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }