mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-26 11:12:19 +08:00
Merge pull request #5424 from chrootsu/lodash-isArray
lodash: changed _.isArray() method
This commit is contained in:
@@ -1145,6 +1145,12 @@ result = <boolean>_(1).gte(2);
|
||||
result = <boolean>_([]).gte(2);
|
||||
result = <boolean>_({}).gte(2);
|
||||
|
||||
// _.isArray
|
||||
result = <boolean>_.isArray(any);
|
||||
result = <boolean>_(1).isArray();
|
||||
result = <boolean>_<any>([]).isArray();
|
||||
result = <boolean>_({}).isArray();
|
||||
|
||||
// _.isEmpty
|
||||
result = <boolean>_.isEmpty([1, 2, 3]);
|
||||
result = <boolean>_.isEmpty({});
|
||||
@@ -1377,9 +1383,6 @@ result = <FirstSecond>_.invert({ 'first': 'moe', 'second': 'larry' });
|
||||
|
||||
(function (...args: any[]) { return <boolean>_.isArguments(arguments); })(1, 2, 3);
|
||||
|
||||
(function () { return <boolean>_.isArray(arguments); })();
|
||||
result = <boolean>_.isArray([1, 2, 3]);
|
||||
|
||||
result = <boolean>_.isBoolean(null);
|
||||
|
||||
result = <boolean>_.isDate(new Date());
|
||||
|
||||
Vendored
+17
-10
@@ -6080,6 +6080,23 @@ declare module _ {
|
||||
gte(other: any): boolean;
|
||||
}
|
||||
|
||||
//_.isArray
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if value is classified as an Array object.
|
||||
* @param value The value to check.
|
||||
* @return Returns true if value is correctly classified, else false.
|
||||
**/
|
||||
isArray(value?: any): boolean;
|
||||
}
|
||||
|
||||
interface LoDashWrapperBase<T,TWrapper> {
|
||||
/**
|
||||
* @see _.isArray
|
||||
*/
|
||||
isArray(): boolean;
|
||||
}
|
||||
|
||||
//_.isEmpty
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -6857,16 +6874,6 @@ declare module _ {
|
||||
isArguments(value?: any): boolean;
|
||||
}
|
||||
|
||||
//_.isArray
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if value is an array.
|
||||
* @param value The value to check.
|
||||
* @return True if the value is an array, else false.
|
||||
**/
|
||||
isArray(value?: any): boolean;
|
||||
}
|
||||
|
||||
//_.isBoolean
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user