diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index b03a48dc6f..5183ffd2ba 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -3487,7 +3487,7 @@ interface JQuery extends Iterable { * @see \`{@link https://api.jquery.com/appendTo/ }\` * @since 1.0 */ - appendTo(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; + appendTo(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; /** * Set one or more attributes for the set of matched elements. * diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index 417d2e7941..72d23a2e8b 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -5670,6 +5670,9 @@ function JQuery() { // $ExpectType JQuery $('span').appendTo($('p')); + + // $ExpectType JQuery + $('span').appendTo(document.createDocumentFragment()); } function insertAfter() {