From b0170d98761af9f6b66743c36723497ea75d0633 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Fri, 18 Dec 2015 19:30:50 +0500 Subject: [PATCH] lodash: signatures of _.isObject have been changed --- lodash/lodash-tests.ts | 22 ++++++++++++++++++---- lodash/lodash.d.ts | 10 +++++++++- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index d661839d5..f29c10e4f 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -5657,10 +5657,24 @@ result = _({}).isNumber(); } // _.isObject -result = _.isObject(any); -result = _(1).isObject(); -result = _([]).isObject(); -result = _({}).isObject(); +module TestIsObject { + { + let result: boolean; + + result = _.isObject(any); + result = _(1).isObject(); + result = _([]).isObject(); + result = _({}).isObject(); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(1).chain().isObject(); + result = _([]).chain().isObject(); + result = _({}).chain().isObject(); + } +} // _.isPlainObject result = _.isPlainObject(any); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 4e86afb66..bd2955462 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -9582,9 +9582,10 @@ declare module _ { /** * Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, new Number(0), * and new String('')) + * * @param value The value to check. * @return Returns true if value is an object, else false. - **/ + */ isObject(value?: any): boolean; } @@ -9595,6 +9596,13 @@ declare module _ { isObject(): boolean; } + interface LoDashExplicitWrapperBase { + /** + * see _.isObject + */ + isObject(): LoDashExplicitWrapper; + } + //_.isPlainObject interface LoDashStatic { /**