Split ElementTagNameMap and remove it #20134
Labels
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Fixed
A PR has been merged for this issue
Suggestion
An idea for TypeScript
Milestone
Some tag names of HTML and SVG are conflicted. So merging these two is wrong.
ElementTagNameMap
has to split intoHTMLElementTagNameMap
andSVGElementTagNameMap
.For example,
a
tag is defined in both HTML and SVG.https://developer.mozilla.org/en-US/docs/Web/HTML/Element
https://developer.mozilla.org/en-US/docs/Web/SVG/Element
So the result type of
document.querySelector('a')
is defined asHTMLAnchorElement
by TypeScript, but the actual type isHTMLAnchorElement | SVGAElement
.related: #14783
The text was updated successfully, but these errors were encountered: