Closed
Description
Describe the bug
Trying to access document.documentElement
or Element.tagName
with TypeScript gives a type error, even though these properties are supported.
To Reproduce
import { DOMImplementation } from '@xmldom/xmldom';
const doc = new DOMImplementation().createDocument(null, 'qualifiedName');
const documentElement = doc.documentElement;
// Property 'documentElement' does not exist on type 'Document'.
const element = doc.createElement('element');
const tagName = element.tagName;
// Property 'tagName' does not exist on type 'Element'.
Expected behavior
documentElement
should be available with the type Element
or Element | null
and tagName
should be available with the type string
Runtime & Version:
xmldom version: 0.9.1