mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
Merge pull request #5491 from chrootsu/lodash-isDate
lodash: changed _.isDate() method
This commit is contained in:
@@ -1201,6 +1201,12 @@ result = <boolean>_(1).isArray();
|
||||
result = <boolean>_<any>([]).isArray();
|
||||
result = <boolean>_({}).isArray();
|
||||
|
||||
// _.isDate
|
||||
result = <boolean>_.isDate(any);
|
||||
result = <boolean>_(42).isDate();
|
||||
result = <boolean>_<any>([]).isDate();
|
||||
result = <boolean>_({}).isDate();
|
||||
|
||||
// _.isEmpty
|
||||
result = <boolean>_.isEmpty([1, 2, 3]);
|
||||
result = <boolean>_.isEmpty({});
|
||||
@@ -1441,8 +1447,6 @@ result = <FirstSecond>_.invert({ 'first': 'moe', 'second': 'larry' });
|
||||
|
||||
result = <boolean>_.isBoolean(null);
|
||||
|
||||
result = <boolean>_.isDate(new Date());
|
||||
|
||||
result = <boolean>_.isElement(document.body);
|
||||
|
||||
// _.isEqual (alias: _.eq)
|
||||
|
||||
27
lodash/lodash.d.ts
vendored
27
lodash/lodash.d.ts
vendored
@@ -6179,6 +6179,23 @@ declare module _ {
|
||||
isArray(): boolean;
|
||||
}
|
||||
|
||||
//_.isDate
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if value is classified as a Date object.
|
||||
* @param value The value to check.
|
||||
* @return Returns true if value is correctly classified, else false.
|
||||
**/
|
||||
isDate(value?: any): boolean;
|
||||
}
|
||||
|
||||
interface LoDashWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* @see _.isDate
|
||||
*/
|
||||
isDate(): boolean;
|
||||
}
|
||||
|
||||
//_.isEmpty
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -6979,16 +6996,6 @@ declare module _ {
|
||||
isBoolean(value?: any): boolean;
|
||||
}
|
||||
|
||||
//_.isDate
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if value is a date.
|
||||
* @param value The value to check.
|
||||
* @return True if the value is a date, else false.
|
||||
**/
|
||||
isDate(value?: any): boolean;
|
||||
}
|
||||
|
||||
//_.isElement
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user