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
Describe the bug
Trying to access
document.documentElementorElement.tagNamewith TypeScript gives a type error, even though these properties are supported.To Reproduce
Expected behavior
documentElementshould be available with the typeElementorElement | nullandtagNameshould be available with the typestringRuntime & Version:
xmldom version: 0.9.1