Open
Description
Describe the bug
It looks like there is a regression issue related to type definitions since release 0.9.2. The actual error message is Argument of type 'Document' is not assignable to parameter of type 'Node'. Type 'Document' is missing the following properties from type 'Node': baseURI, isConnected, parentElement,
Before xmldom 0.9.2 patch there were no linter errors detected in the same piece of code.
To Reproduce
import {select as xpathQuery} from 'xpath';
import {DOMParser, MIME_TYPE} from '@xmldom/xmldom';
function runQuery(query, xmlStr) {
const dom = new DOMParser().parseFromString(xmlStr, MIME_TYPE.XML_TEXT);
const nodes = xpathQuery(query, dom);
return nodes;
}
Expected behavior
No linter errors
Runtime & Version:
xmldom version: 0.9.2
runtime version: any
other related software and version:
Additional context