[configs-overload]: add configs-overload type defenition (#41682)

This commit is contained in:
Anton Drobot
2020-01-17 14:23:35 -05:00
committed by Eli Barzilay
parent 314993b4c5
commit 71d5b5b1fc
4 changed files with 47 additions and 0 deletions
@@ -0,0 +1,8 @@
import configsOverload from 'configs-overload';
configsOverload();
configsOverload('./configs');
configsOverload('./configs', {});
configsOverload('./configs', { defaultEnv: 'default' });
configsOverload('./configs', { env: 'production' });
configsOverload('./configs', { defaultEnv: 'default', env: 'production' });
+15
View File
@@ -0,0 +1,15 @@
// Type definitions for configs-overload 0.2
// Project: https://github.com/floatdrop/configs-overload
// Definitions by: Anton Drobot <https://github.com/anton-drobot>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface ConfigsOverloadOptions {
defaultEnv?: string;
env?: string;
}
export interface ExtendableConfig {
[key: string]: any;
}
export default function configsOverload(configsDirectory?: string, options?: ConfigsOverloadOptions): ExtendableConfig;
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"configs-overload-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }