diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 18f2e8b7a..9cf789a77 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1145,6 +1145,12 @@ result = _(1).gte(2); result = _([]).gte(2); result = _({}).gte(2); +// _.isArray +result = _.isArray(any); +result = _(1).isArray(); +result = _([]).isArray(); +result = _({}).isArray(); + // _.isEmpty result = _.isEmpty([1, 2, 3]); result = _.isEmpty({}); @@ -1377,9 +1383,6 @@ result = _.invert({ 'first': 'moe', 'second': 'larry' }); (function (...args: any[]) { return _.isArguments(arguments); })(1, 2, 3); -(function () { return _.isArray(arguments); })(); -result = _.isArray([1, 2, 3]); - result = _.isBoolean(null); result = _.isDate(new Date()); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 4a0b848c5..af33ea9b0 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -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 { + /** + * @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 { /**