From 61c54e2b00b53570d2fbace9b59e2ff1240875e6 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Mon, 24 Aug 2015 00:25:56 +0500 Subject: [PATCH] lodash: changed _.isArguments() method --- lodash/lodash-tests.ts | 8 ++++++-- lodash/lodash.d.ts | 27 +++++++++++++++++---------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 00ca144fd2..9003a5e00b 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1195,6 +1195,12 @@ result = _(1).gte(2); result = _([]).gte(2); result = _({}).gte(2); +// _.isArguments +result = _.isArguments(any); +result = _(1).isArguments(); +result = _([]).isArguments(); +result = _({}).isArguments(); + // _.isArray result = _.isArray(any); result = _(1).isArray(); @@ -1437,8 +1443,6 @@ interface FirstSecond { } result = _.invert({ 'first': 'moe', 'second': 'larry' }); -(function (...args: any[]) { return _.isArguments(arguments); })(1, 2, 3); - result = _.isBoolean(null); result = _.isDate(new Date()); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 77daeca2a1..62b5c0f899 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -6162,6 +6162,23 @@ declare module _ { gte(other: any): boolean; } + //_.isArguments + interface LoDashStatic { + /** + * Checks if value is classified as an arguments object. + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isArguments(value?: any): boolean; + } + + interface LoDashWrapperBase { + /** + * @see _.isArguments + */ + isArguments(): boolean; + } + //_.isArray interface LoDashStatic { /** @@ -6959,16 +6976,6 @@ declare module _ { invert(object: any): any; } - //_.isArguments - interface LoDashStatic { - /** - * Checks if value is an arguments object. - * @param value The value to check. - * @return True if the value is an arguments object, else false. - **/ - isArguments(value?: any): boolean; - } - //_.isBoolean interface LoDashStatic { /**