diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index 4ebb4692f5..2fd196fd41 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -587,7 +587,7 @@ interface JQueryStatic { * @see {@link https://api.jquery.com/jQuery.isEmptyObject/} * @since 1.4 */ - isEmptyObject(obj: any): obj is {}; + isEmptyObject(obj: any): boolean; /** * Determine if the argument passed is a JavaScript function object. * diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index 01cc4a345e..0485d05351 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -627,12 +627,8 @@ function JQueryStatic() { } function isEmptyObject() { - function type_guard(obj: object) { - if ($.isEmptyObject(obj)) { - // $ExpectType {} - obj; - } - } + // $ExpectType boolean + $.isEmptyObject({}); } function isFunction() {