-
Notifications
You must be signed in to change notification settings - Fork 423
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
Node.parentElement
should be Element | null
, not HTMLElement | null
#1151
Comments
I left some comments. Plus imagine when something useful like this comes out in the future: The only proper type for these DOM APIs is |
@trusktr ref microsoft/TypeScript#42067 (comment) |
Yeah, this has been well covered and discussed. I don't think I've seen anything new in the comments to warrant keeping this issue around. If you'd like you, can fork this repo to ship your own dom.d.ts build with this in 4.5, but it's unlikely to come in by default given the trade-offs. |
Hello! I'm new to this. How exactly would I change that?
For example, a
<g>
element somewhere inside an<svg>
element will have a.parentElement
that is anSVGElement
, which is not anHTMLElement
.The text was updated successfully, but these errors were encountered: