diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index b0e4f6848d..7162d4b2da 100644 --- a/types/lodash/index.d.ts +++ b/types/lodash/index.d.ts @@ -9515,7 +9515,7 @@ declare namespace _ { * @param value The value to check. * @return Returns true if value is correctly classified, else false. */ - isFunction(value?: any): value is (...args: any[]) => any; + isFunction(value: any): value is (...args: any[]) => any; } interface LoDashImplicitWrapper { diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index c7fb313dec..1977626262 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -8060,7 +8060,11 @@ namespace TestIsFunction { let result: Function = value; } else { - let result: number = value; + let result: number|Function = value; + } + + if (_.isFunction(any)) { + any(); } }