From f377d05079680b15f086d897450b7bd909d541e8 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 25 Mar 2020 17:49:24 -0700 Subject: [PATCH] Add Document to JQuery.Node type alias (#43384) DocumentFragment was added earlier, but Document isn't assignable to DocumentFragment in Typescript 3.9, so both need to be part of the union that makes up Node. --- types/jquery/misc.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/jquery/misc.d.ts b/types/jquery/misc.d.ts index 0bd848597f..aa1da4bc8a 100644 --- a/types/jquery/misc.d.ts +++ b/types/jquery/misc.d.ts @@ -4,7 +4,7 @@ declare namespace JQuery { type TypeOrArray = T | T[]; - type Node = Element | Text | Comment | DocumentFragment; + type Node = Element | Text | Comment | Document | DocumentFragment; /** * A string is designated htmlString in jQuery documentation when it is used to represent one or more DOM elements, typically to be created and inserted in the document. When passed as an argument of the jQuery() function, the string is identified as HTML if it starts with ) and is parsed as such until the final > character. Prior to jQuery 1.9, a string was considered to be HTML if it contained anywhere within the string.