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
In this example, the TypeScript parser sends an error: "Property 'querySelector' does not exist on type 'Node'."
However, in the real DOM (at least in Firefox, but i'm pretty sure in other browsers too), el2 is an HTMLInputElement (like el) and this property does exist on it
and i feel it probably should be something like: cloneNode<T extends Node>(deep?: boolean): T;
or maybe something with the type of this, i'm not super-familiar yet with this part of TypeScript
I haven't taken the time to understand how this repo works, so i'm not sure how to transform this idea into a PR, but in any case, at this point, i'm more interested in understanding whether you agree on the problem i'm describing here
Thanks for your time reading this issue!
The text was updated successfully, but these errors were encountered:
Hi, this is my first issue here so i'm trying my best and hope it'll work
and if it doesn't, let me know and i'll try to improve my feedback
I'm sharing this example:
In playground: https://www.typescriptlang.org/play?#code/MYewdgzgLgBApgGxgXhgExMArgWzmKAOmACc4BDKOAUQTjwIAoByASzAAcspmBKAKH6hIsRACYU8BMQTg4AORBo4jAf3GEAjljgkAngGVEcYFBAkWfIA
In this example, the TypeScript parser sends an error: "Property 'querySelector' does not exist on type 'Node'."
However, in the real DOM (at least in Firefox, but i'm pretty sure in other browsers too),
el2
is anHTMLInputElement
(likeel
) and this property does exist on itThe type I see in the generated version of the dom library is:
cloneNode(deep?: boolean): Node;
and i feel it probably should be something like:
cloneNode<T extends Node>(deep?: boolean): T;
or maybe something with the type of
this
, i'm not super-familiar yet with this part of TypeScriptI haven't taken the time to understand how this repo works, so i'm not sure how to transform this idea into a PR, but in any case, at this point, i'm more interested in understanding whether you agree on the problem i'm describing here
Thanks for your time reading this issue!
The text was updated successfully, but these errors were encountered: