8000 Argument of type 'Document' is not assignable to parameter of type 'Node' after update to xmldom 0.9.2 · Issue #724 · xmldom/xmldom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Argument of type 'Document' is not assignable to parameter of type 'Node' after update to xmldom 0.9.2 #724
Open
@mykola-mokhnach

Description

@mykola-mokhnach

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

appium/appium@67799c9

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds investigationInformation is missing and needs to be researched

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0