diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 9cae2a872..dff86b8d2 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -5397,12 +5397,25 @@ result = _({}).isMatch({}, testIsMatchCustiomizerFn); result = _({}).isMatch({}, testIsMatchCustiomizerFn, {}); // _.isNaN -result = _.isNaN(NaN); -result = _.isNaN(new Number(NaN)); -result = _.isNaN(undefined); -result = _(NaN).isNaN(); -result = _(new Number(NaN)).isNaN(); -result = _(undefined).isNaN(); +module TestIsNaN { + { + let result: boolean; + + result = _.isNaN(any); + + result = _(1).isNaN(); + result = _([]).isNaN(); + result = _({}).isNaN(); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(1).chain().isNaN(); + result = _([]).chain().isNaN(); + result = _({}).chain().isNaN(); + } +} // _.isNative result = _.isNative(Array.prototype.push); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index ed8d72443..a2142896b 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -9272,7 +9272,9 @@ declare module _ { interface LoDashStatic { /** * Checks if value is NaN. + * * Note: This method is not the same as isNaN which returns true for undefined and other non-numeric values. + * * @param value The value to check. * @return Returns true if value is NaN, else false. */ @@ -9286,6 +9288,13 @@ declare module _ { isNaN(): boolean; } + interface LoDashExplicitWrapperBase { + /** + * @see _.isNaN + */ + isNaN(): LoDashExplicitWrapper; + } + //_.isNative interface LoDashStatic { /**