Reverted multiple type definitions for simpler logic

This commit is contained in:
Adam Zerella
2019-03-18 19:19:53 +11:00
6 changed files with 1 additions and 59 deletions
+1 -4
View File
@@ -2,10 +2,7 @@
// Project: https://github.com/ljharb/is-date-object
// Definitions by: Adam Zerella <https://github.com/adamzerella>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
declare function isDateObject(value: Date): true;
declare function isDateObject(value?: object): boolean;
declare function isDateObject(value?: null | boolean | string | number): false;
declare function isDateObject(value?: any): boolean;
export = isDateObject;
-7
View File
@@ -1,7 +0,0 @@
{
"private": true,
"types": "index",
"typesVersions": {
">=3.1.0-0": { "*": ["ts3.1/*"] }
}
}
-5
View File
@@ -1,5 +0,0 @@
declare function isDateObject(value: Date): true;
declare function isDateObject(value?: object): boolean;
declare function isDateObject(value?: null | boolean | string | number | symbol | bigint | []): false;
export = isDateObject;
@@ -1,15 +0,0 @@
import isDate = require("is-date-object");
isDate();
isDate(undefined);
isDate(null);
isDate(false);
isDate(true);
isDate(42);
isDate('foo');
isDate((): void => {});
isDate([]);
isDate({});
isDate(/a/g);
isDate(new RegExp('a', 'g'));
isDate(new Date());
-25
View File
@@ -1,25 +0,0 @@
{
"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
@@ -1,3 +0,0 @@
{
"extends": "dtslint/dt.json"
}