You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
The text was updated successfully, but these errors were encountered:
What properties of Node does xpath need to do it's job?
xmldom now finally only specifies the properties it actually implements.
By using `Pick<Node, ...> it should be possible to still use libs like xmldom, that do not provide all properties.
One reason for us to vendor the subset of types that we support, was that people complained about the globals that xmldom added without implementing them, just because it referenced the dom stuff in it's type definition. And on our side there are no current plans of implementing all those props, so it would feel weird to go with the suggestion to add the types for them or add an implementation throwing a NotImplementedError, since it communicates that we are planning to implement them...
@karfau some if not most of the required properties are actually already there, just not correctly maintained within the index.d.ts as mentioned in xmldom/xmldom#725. I will try to add them in the following days if I get the time to do so since it also makes our code kinda messy.
bph-sag
added a commit
to bph-sag/apama-vscode-extensions
that referenced
this issue
Sep 25, 2024
xpath/README.md
Line 33 in 4c181e8
The line above gives me the following error:
The text was updated successfully, but these errors were encountered: