Added type defs for is-date-object

This commit is contained in:
Adam A. Zerella
2019-03-07 12:17:30 +11:00
parent 138f4f76bd
commit 7ea404d70b
4 changed files with 50 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for is-date-object 1.0
// Project: https://github.com/ljharb/is-date-object
// Definitions by: Adam Zerella <https://github.com/adamzerella>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function isDateObject(value?: any): boolean;
export = isDateObject;
@@ -0,0 +1,14 @@
import isDate = require("is-date-object");
isDate();
isDate(undefined);
isDate(null);
isDate(false);
isDate(true);
isDate(42);
isDate('foo');
isDate([]);
isDate({});
isDate(/a/g);
isDate(new RegExp('a', 'g'));
isDate(new Date());
+25
View File
@@ -0,0 +1,25 @@
{
"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-date-object-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}