From 540eb0e5870cc47394abb8082048ed85d22e009c Mon Sep 17 00:00:00 2001 From: Homa Wong Date: Wed, 25 Oct 2017 14:44:10 -0700 Subject: [PATCH 1/5] Update index.d.ts --- types/lodash/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index f1685af04f..b0e4f6848d 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) | Function; + isFunction(value?: any): value is (...args: any[]) => any; } interface LoDashImplicitWrapper { From 893b0c790c8ea24c1080fe6da1f52d62a08704d9 Mon Sep 17 00:00:00 2001 From: Homa Wong Date: Sat, 28 Oct 2017 16:58:34 -0700 Subject: [PATCH 2/5] Update index.d.ts --- types/lodash/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index b0e4f6848d..b8d83d27b3 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?: F): value is F; } interface LoDashImplicitWrapper { From 11526a8ca01e8a9489a5f1824afe8823a2d73b3a Mon Sep 17 00:00:00 2001 From: Homa Wong Date: Sat, 28 Oct 2017 19:33:56 -0700 Subject: [PATCH 3/5] Update index.d.ts --- types/lodash/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index b8d83d27b3..b0e4f6848d 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?: F): value is F; + isFunction(value?: any): value is (...args: any[]) => any; } interface LoDashImplicitWrapper { From b1d265b84d8db726b0e0dcd94b6b8f7fde414bdb Mon Sep 17 00:00:00 2001 From: unional Date: Tue, 31 Oct 2017 13:44:26 -0700 Subject: [PATCH 4/5] Update test, remove optional --- types/lodash/index.d.ts | 2 +- types/lodash/lodash-tests.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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(); } } From dfdc7a320d3a8a722857452a2be62073539e2e5c Mon Sep 17 00:00:00 2001 From: Homa Wong Date: Wed, 1 Nov 2017 21:52:00 -0700 Subject: [PATCH 5/5] Misc update to trigger build --- types/lodash/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index 7162d4b2da..3143cdc0b4 100644 --- a/types/lodash/index.d.ts +++ b/types/lodash/index.d.ts @@ -9510,7 +9510,7 @@ 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.