mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-28 12:43:06 +08:00
lodash: changed _.isFinite() method
This commit is contained in:
@@ -1147,6 +1147,12 @@ result = <boolean>_([1, 2, 3]).isEmpty();
|
||||
result = <boolean>_({}).isEmpty();
|
||||
result = <boolean>_('').isEmpty();
|
||||
|
||||
// _.isFinite
|
||||
result = <boolean>_.isFinite(any);
|
||||
result = <boolean>_(1).isFinite();
|
||||
result = <boolean>_<any>([]).isFinite();
|
||||
result = <boolean>_({}).isFinite();
|
||||
|
||||
// _.isMatch
|
||||
var testIsMatchCustiomizerFn: (value: any, other: any, indexOrKey: number|string) => boolean;
|
||||
result = <boolean>_.isMatch({}, {});
|
||||
@@ -1399,12 +1405,6 @@ result = <boolean>_(testEqArray).isEqual(testEqOtherArray, testEqCustomizerFn);
|
||||
result = <boolean>_.eq(testEqArray, testEqOtherArray, testEqCustomizerFn);
|
||||
result = <boolean>_(testEqArray).eq(testEqOtherArray, testEqCustomizerFn);
|
||||
|
||||
result = <boolean>_.isFinite(-101);
|
||||
result = <boolean>_.isFinite('10');
|
||||
result = <boolean>_.isFinite(true);
|
||||
result = <boolean>_.isFinite('');
|
||||
result = <boolean>_.isFinite(Infinity);
|
||||
|
||||
result = <boolean>_.isFunction(_);
|
||||
|
||||
result = <boolean>_.isNull(null);
|
||||
|
||||
Vendored
+18
-13
@@ -6098,6 +6098,24 @@ declare module _ {
|
||||
isEmpty(): boolean;
|
||||
}
|
||||
|
||||
//_.isFinite
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if value is a finite primitive number.
|
||||
* Note: This method is based on Number.isFinite.
|
||||
* @param value The value to check.
|
||||
* @return Returns true if value is a finite number, else false.
|
||||
**/
|
||||
isFinite(value?: any): boolean;
|
||||
}
|
||||
|
||||
interface LoDashWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* @see _.isFinite
|
||||
*/
|
||||
isFinite(): boolean;
|
||||
}
|
||||
|
||||
//_.isMatch
|
||||
interface isMatchCustomizer {
|
||||
(value: any, other: any, indexOrKey?: number|string): boolean;
|
||||
@@ -6970,19 +6988,6 @@ declare module _ {
|
||||
thisArg?: any): boolean;
|
||||
}
|
||||
|
||||
//_.isFinite
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if value is, or can be coerced to, a finite number.
|
||||
*
|
||||
* Note: This is not the same as native isFinite which will return true for booleans and empty
|
||||
* strings. See http://es5.github.io/#x15.1.2.5.
|
||||
* @param value The value to check.
|
||||
* @return True if the value is finite, else false.
|
||||
**/
|
||||
isFinite(value?: any): boolean;
|
||||
}
|
||||
|
||||
//_.isFunction
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user