diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index 024dcc3ab8..d0e80de159 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -3017,7 +3017,7 @@ interface JQuery extends Iterable * @see {@link https://api.jquery.com/after/} * @since 1.0 */ - after(...contents: Array | JQuery>): this; + after(...contents: Array | JQuery>): this; /** * Insert content, specified by the parameter, after each element in the set of matched elements. * @@ -3029,7 +3029,7 @@ interface JQuery extends Iterable * @since 1.4 * @since 1.10 */ - after(fn: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + after(fn: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; /** * Register a handler to be called when Ajax requests complete. This is an AjaxEvent. * @@ -3133,7 +3133,7 @@ interface JQuery extends Iterable * @see {@link https://api.jquery.com/append/} * @since 1.0 */ - append(...contents: Array | JQuery>): this; + append(...contents: Array | JQuery>): this; /** * Insert content, specified by the parameter, to the end of each element in the set of matched elements. * @@ -3144,7 +3144,7 @@ interface JQuery extends Iterable * @see {@link https://api.jquery.com/append/} * @since 1.4 */ - append(fn: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + append(fn: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; /** * Insert every element in the set of matched elements to the end of the target. * @@ -3191,7 +3191,7 @@ interface JQuery extends Iterable * @see {@link https://api.jquery.com/before/} * @since 1.0 */ - before(...contents: Array | JQuery>): this; + before(...contents: Array | JQuery>): this; /** * Insert content, specified by the parameter, before each element in the set of matched elements. * @@ -3203,7 +3203,7 @@ interface JQuery extends Iterable * @since 1.4 * @since 1.10 */ - before(fn: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + before(fn: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; // [bind() overloads] https://github.com/jquery/api.jquery.com/issues/1048 /** * Attach a handler to an event for the elements. @@ -4595,7 +4595,7 @@ interface JQuery extends Iterable * @see {@link https://api.jquery.com/prepend/} * @since 1.0 */ - prepend(...contents: Array | JQuery>): this; + prepend(...contents: Array | JQuery>): this; /** * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. * @@ -4606,7 +4606,7 @@ interface JQuery extends Iterable * @see {@link https://api.jquery.com/prepend/} * @since 1.4 */ - prepend(fn: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + prepend(fn: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; /** * Insert every element in the set of matched elements to the beginning of the target. * diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index d223be9d5c..d81dd3b6f3 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -5130,7 +5130,7 @@ function JQuery() { function manipulation() { function after() { // $ExpectType JQuery - $('p').after('

', new Element(), new Text(), $('p'), [new Element(), new Text()]); + $('p').after('

', new Element(), new Text(), $('p').contents(), [new Element(), new Text()]); // $ExpectType JQuery $('p').after(function(index, html) { @@ -5189,13 +5189,13 @@ function JQuery() { // $ExpectType string html; - return $('p'); + return $('p').contents(); }); } function append() { // $ExpectType JQuery - $('p').append('

', new Element(), new Text(), $('p'), [new Element(), new Text()]); + $('p').append('

', new Element(), new Text(), $('p').contents(), [new Element(), new Text()]); // $ExpectType JQuery $('p').append(function(index, html) { @@ -5254,7 +5254,7 @@ function JQuery() { // $ExpectType string html; - return $('p'); + return $('p').contents(); }); // $ExpectType JQuery @@ -5263,7 +5263,7 @@ function JQuery() { function before() { // $ExpectType JQuery - $('p').before('

', new Element(), new Text(), $('p'), [new Element(), new Text()]); + $('p').before('

', new Element(), new Text(), $('p').contents(), [new Element(), new Text()]); // $ExpectType JQuery $('p').before(function(index, html) { @@ -5322,13 +5322,13 @@ function JQuery() { // $ExpectType string html; - return $('p'); + return $('p').contents(); }); } function prepend() { // $ExpectType JQuery - $('p').prepend('

', new Element(), new Text(), $('p'), [new Element(), new Text()]); + $('p').prepend('

', new Element(), new Text(), $('p').contents(), [new Element(), new Text()]); // $ExpectType JQuery $('p').prepend(function(index, html) { @@ -5387,7 +5387,7 @@ function JQuery() { // $ExpectType string html; - return $('p'); + return $('p').contents(); }); }