ITADN

override missing from createElementNS

#63556Openmozesstumpf 创建于 2026-06-15
M
mozesstumpfcommented
### ⚙ Compilation target ESNext ### ⚙ Library 6.0.0 ### Missing / Incorrect Definition override is missing for the `createElementNS` in case provide `"http://www.w3.org/1999/xhtml"` as `namespaceURI`. ```ts // missing createElementNS<K extends keyof HTMLElementTagNameMap>(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: K): HTMLElementTagNameMap[K]; createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement; createElementNS<K extends keyof SVGElementTagNameMap>(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: K): SVGElementTagNameMap[K]; createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement; createElementNS<K extends keyof MathMLElementTagNameMap>(namespaceURI: "http://www.w3.org/1998/Math/MathML", qualifiedName: K): MathMLElementTagNameMap[K]; ``` ### Sample Code ```TypeScript document.createElementNS("http://www.w3.org/1999/xhtml", 'div'); // HTMLElement instead of HTMLDivElement ``` ### Documentation Link _No response_
1 条评论