lodash: signatures of _.isNaN have been changed

This commit is contained in:
Ilya Mochalov
2015-12-03 06:43:54 +05:00
parent 78d36dd49b
commit dc36a0774f
2 changed files with 28 additions and 6 deletions
+19 -6
View File
@@ -5397,12 +5397,25 @@ result = <boolean>_({}).isMatch({}, testIsMatchCustiomizerFn);
result = <boolean>_({}).isMatch({}, testIsMatchCustiomizerFn, {});
// _.isNaN
result = <boolean>_.isNaN(NaN);
result = <boolean>_.isNaN(new Number(NaN));
result = <boolean>_.isNaN(undefined);
result = <boolean>_(NaN).isNaN();
result = <boolean>_(new Number(NaN)).isNaN();
result = <boolean>_(undefined).isNaN();
module TestIsNaN {
{
let result: boolean;
result = _.isNaN(any);
result = _(1).isNaN();
result = _<any>([]).isNaN();
result = _({}).isNaN();
}
{
let result: _.LoDashExplicitWrapper<boolean>;
result = _(1).chain().isNaN();
result = _<any>([]).chain().isNaN();
result = _({}).chain().isNaN();
}
}
// _.isNative
result = <boolean>_.isNative(Array.prototype.push);
+9
View File
@@ -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<T, TWrapper> {
/**
* @see _.isNaN
*/
isNaN(): LoDashExplicitWrapper<boolean>;
}
//_.isNative
interface LoDashStatic {
/**