From 9cd2d6f51ab340559f647ca2ef911cf074934f7a Mon Sep 17 00:00:00 2001 From: Terry Mun Date: Tue, 11 Sep 2018 13:29:18 +0200 Subject: [PATCH] .appendTo() should accept a document fragment as an argument (not just Element) --- types/jquery/index.d.ts | 2 +- types/jquery/jquery-tests.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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() {