diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index bac194ee78..ef3d33a09e 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -235,7 +235,6 @@ interface JQueryStatic { * * @param element The DOM element to query for the data. * @param key Name of the data stored. - * @param undefined * @see {@link https://api.jquery.com/jQuery.data/} * @since 1.2.3 */ @@ -728,7 +727,7 @@ interface JQueryStatic { * @see {@link https://api.jquery.com/jQuery.parseHTML/} * @since 1.8 */ - parseHTML(data: string, context_keepScripts?: Document | null | undefined | boolean): JQuery.Node[]; + parseHTML(data: string, context_keepScripts?: Document | null | boolean): JQuery.Node[]; /** * Takes a well-formed JSON string and returns the resulting JavaScript value. * @@ -3422,7 +3421,6 @@ interface JQuery extends Iterable * data(name, value) or by an HTML5 data-* attribute. * * @param key Name of the data stored. - * @param undefined * @see {@link https://api.jquery.com/data/} * @since 1.2.3 */ @@ -6774,7 +6772,7 @@ declare namespace JQuery { (failFilter?: ((t: TJ, u: UJ, v: VJ, ...s: SJ[]) => PromiseBase | Thenable | ARF) | undefined | null): PromiseBase | Thenable | ARF) | null): PromiseBase; @@ -7355,7 +7353,7 @@ declare namespace JQuery { (failFilter?: ((...t: TJ[]) => PromiseBase | Thenable | ARF) | undefined | null): PromiseBase | Thenable | ARF) | null): PromiseBase; diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index 32f26b1489..6cb790f408 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -7193,7 +7193,8 @@ function JQuery_Promise3() { } async function testAsync(p: JQuery.Promise3): Promise { - return await p; + const s: string = await p; + return s; } function compatibleWithPromise(): Promise { @@ -7336,7 +7337,8 @@ function JQuery_Promise2(p: JQuery.Promise2): Promise { - return await p; + const s: string = await p; + return s; } function compatibleWithPromise(): Promise { @@ -7456,7 +7458,8 @@ function JQuery_Promise(p: JQuery.Promise) { } async function testAsync(p: JQuery.Promise): Promise { - return await p; + const s: string = await p; + return s; } function compatibleWithPromise(): Promise {