mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-04 19:42:46 +08:00
[is-empty] add types
This commit is contained in:
11
types/is-empty/index.d.ts
vendored
Normal file
11
types/is-empty/index.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// Type definitions for is-empty 1.2
|
||||
// Project: https://github.com/ianstormtaylor/is-empty
|
||||
// Definitions by: Stanislav Termosa <https://github.com/termosa>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Test if a value is empty
|
||||
*/
|
||||
declare function isEmpty(value: any): boolean;
|
||||
|
||||
export default isEmpty;
|
||||
10
types/is-empty/is-empty-tests.ts
Normal file
10
types/is-empty/is-empty-tests.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import isEmpty from 'is-empty';
|
||||
|
||||
isEmpty({});
|
||||
isEmpty(null);
|
||||
isEmpty(undefined);
|
||||
isEmpty(9);
|
||||
isEmpty(new Object());
|
||||
isEmpty(Array);
|
||||
isEmpty('');
|
||||
isEmpty(() => {});
|
||||
23
types/is-empty/tsconfig.json
Normal file
23
types/is-empty/tsconfig.json
Normal 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",
|
||||
"is-empty-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/is-empty/tslint.json
Normal file
1
types/is-empty/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user