Open Stadly opened 4 months ago
Would it be possible to improve the return type of Node.cloneNode?
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.
clone
SVGElement
Node
There is an issue in the TypeScript repo, but very little activity lately: https://github.com/microsoft/TypeScript/issues/283
Would it be possible to improve the return type of
Node.cloneNode
?For example:
I would expect the type of
clone
to beSVGElement
, but it is in factNode
.