Skip to content
New issue

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

Improve return type of Node.cloneNode #192

Open
Stadly opened this issue Mar 20, 2024 · 1 comment
Open

Improve return type of Node.cloneNode #192

Stadly opened this issue Mar 20, 2024 · 1 comment

Comments

@Stadly
Copy link

Stadly commented Mar 20, 2024

Would it be possible to improve the return type of Node.cloneNode?

For example:

let svg: SVGElement;
const clone = svg.cloneNode(true);

I would expect the type of clone to be SVGElement, but it is in fact Node.

@Stadly
Copy link
Author

Stadly commented Mar 20, 2024

There is an issue in the TypeScript repo, but very little activity lately: microsoft/TypeScript#283

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant