lodash: changed _.isFunction() method

This commit is contained in:
Ilya Mochalov
2015-08-24 00:37:36 +05:00
parent af81415504
commit e47ef31f9b
2 changed files with 23 additions and 12 deletions
+6 -2
View File
@@ -1215,6 +1215,12 @@ result = <boolean>_(1).isFinite();
result = <boolean>_<any>([]).isFinite();
result = <boolean>_({}).isFinite();
// _.isFunction
result = <boolean>_.isFunction(any);
result = <boolean>_(1).isFunction();
result = <boolean>_<any>([]).isFunction();
result = <boolean>_({}).isFunction();
// _.isMatch
var testIsMatchCustiomizerFn: (value: any, other: any, indexOrKey: number|string) => boolean;
result = <boolean>_.isMatch({}, {});
@@ -1470,8 +1476,6 @@ result = <boolean>_(testEqArray).isEqual(testEqOtherArray, testEqCustomizerFn);
result = <boolean>_.eq(testEqArray, testEqOtherArray, testEqCustomizerFn);
result = <boolean>_(testEqArray).eq(testEqOtherArray, testEqCustomizerFn);
result = <boolean>_.isFunction(_);
result = <boolean>_.isNull(null);
result = <boolean>_.isNull(undefined);
+17 -10
View File
@@ -6215,6 +6215,23 @@ declare module _ {
isFinite(): boolean;
}
//_.isFunction
interface LoDashStatic {
/**
* Checks if value is classified as a Function object.
* @param value The value to check.
* @return Returns true if value is correctly classified, else false.
**/
isFunction(value?: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* @see _.isFunction
*/
isFunction(): boolean;
}
//_.isMatch
interface isMatchCustomizer {
(value: any, other: any, indexOrKey?: number|string): boolean;
@@ -7090,16 +7107,6 @@ declare module _ {
thisArg?: any): boolean;
}
//_.isFunction
interface LoDashStatic {
/**
* Checks if value is a function.
* @param value The value to check.
* @return True if the value is a function, else false.
**/
isFunction(value?: any): boolean;
}
//_.isNull
interface LoDashStatic {
/**