mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-04-14 09:34:39 +00:00
Merge pull request #21015 from unional/patch-8
Fix lodash.isFunction typings
This commit is contained in:
4
types/lodash/index.d.ts
vendored
4
types/lodash/index.d.ts
vendored
@@ -9510,12 +9510,12 @@ declare namespace _ {
|
||||
//_.isFunction
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if value is classified as a Function object.
|
||||
* Checks if value is a callable function.
|
||||
*
|
||||
* @param value The value to check.
|
||||
* @return Returns true if value is correctly classified, else false.
|
||||
*/
|
||||
isFunction(value?: any): value is ((...args: any[]) => any) | Function;
|
||||
isFunction(value: any): value is (...args: any[]) => any;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
|
||||
@@ -8060,7 +8060,11 @@ namespace TestIsFunction {
|
||||
let result: Function = value;
|
||||
}
|
||||
else {
|
||||
let result: number = value;
|
||||
let result: number|Function = value;
|
||||
}
|
||||
|
||||
if (_.isFunction(any)) {
|
||||
any();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user