feat: add typings for defaults-deep

This commit is contained in:
Hugo Alliaume
2019-01-27 10:13:51 +01:00
parent 55dbfec2eb
commit ef068528b4
4 changed files with 41 additions and 0 deletions
@@ -0,0 +1,7 @@
import defaults from 'defaults-deep';
defaults();
defaults({a: 'foo'});
defaults({a: 'foo'}, {a: 'bar'});
defaults({a: 'foo'}, {a: 'bar'}, {a: 'foobar'});
defaults({a: {b: 'foo'}}, {a: {b: 'bar'}});
+10
View File
@@ -0,0 +1,10 @@
// Type definitions for defaults-deep 0.2
// Project: https://github.com/jonschlinkert/defaults-deep
// Definitions by: Kocal <https://github.com/Kocal>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Obj {
[k: string]: any;
}
export default function defaultDeep(obj?: Obj, ...objs: Obj[]): Obj;
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"defaults-deep-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }