Updated any type to unknown

This commit is contained in:
Adam A. Zerella
2019-03-06 21:39:54 +11:00
committed by Adam Zerella
parent 1c3a4a3c99
commit 462c6f2a82
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -2,7 +2,12 @@
// 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.3
declare function isDateObject(value?: any): boolean;
type InvalidTypes = undefined | null | boolean | string | number | [] | {};
declare function isDateObject(value: Date): true;
declare function isDateObject(value: InvalidTypes | unknown): false;
declare function isDateObject(value?: unknown): false;
export = isDateObject;
@@ -7,6 +7,7 @@ isDate(false);
isDate(true);
isDate(42);
isDate('foo');
isDate((): void => {});
isDate([]);
isDate({});
isDate(/a/g);