From 5db3c488479820fa80241573f935449e1e3dd411 Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Fri, 19 Apr 2019 19:01:38 +0800 Subject: [PATCH] Add generic support to `Element.closest()` --- lib/lib.dom.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lib.dom.d.ts b/lib/lib.dom.d.ts index 7817a0e426704..ccc1bc044f161 100644 --- a/lib/lib.dom.d.ts +++ b/lib/lib.dom.d.ts @@ -4897,7 +4897,7 @@ interface Element extends Node, ParentNode, NonDocumentTypeChildNode, ChildNode, */ closest(selector: K): HTMLElementTagNameMap[K] | null; closest(selector: K): SVGElementTagNameMap[K] | null; - closest(selector: string): Element | null; + closest(selector: string): E | null; /** * Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise. */