diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index b64751cf4..ce60da779 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -5466,12 +5466,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 a8d6e5736..801b66be9 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -9423,7 +9423,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. */ @@ -9437,6 +9439,13 @@ declare module _ { isNaN(): boolean; } + interface LoDashExplicitWrapperBase { + /** + * @see _.isNaN + */ + isNaN(): LoDashExplicitWrapper; + } + //_.isNative interface LoDashStatic { /**