We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Attr.cloneNode()
Attr
Node
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attr extends Node, but Attr.cloneNode() returns a new Attr, not just a Node.
Chrome dev tools:
But in lib.dom.d.ts, its return type is Node. This can give false errors, like this example from the VS Code TS linter:
lib.dom.d.ts
The text was updated successfully, but these errors were encountered:
It's just special case of microsoft/TypeScript#283 #811 was reverted as it broke libs in DefinitelyTyped
Sorry, something went wrong.
No branches or pull requests
Expectation
Attr
extendsNode
, butAttr.cloneNode()
returns a newAttr
, not just aNode
.Chrome dev tools:
Reality
But in
lib.dom.d.ts
, its return type isNode
. This can give false errors, like this example from the VS Code TS linter:The text was updated successfully, but these errors were encountered: