Skip to content

Not compatible with @xmldom/xmldom@^0.9.1: Argument of type 'Document' is not assignable to parameter of type 'Node'. #144

@mateusz-plociennik

Description

@mateusz-plociennik

var nodes = xpath.select("//title", doc);

The line above gives me the following error:

lib/commands/find.ts:66:40 - error TS2769: No overload matches this call.
  Overload 1 of 3, '(expression: string, node: Node, single: false): SelectReturnType', gave the following error.
    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, textContent, and 7 more.
  Overload 2 of 3, '(expression: string, node: Node, single: true): SelectedValue', gave the following error.
    Argument of type 'Document' is not assignable to parameter of type 'Node'.

66   const nodes = xpath.select(selector, doc, false);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions