-
Notifications
You must be signed in to change notification settings - Fork 421
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
ChildNode/ParentNode no longer extending Node #1087
Comments
Adding
TBH that was one of the changes back in the experimental types-web era where I wanted to be bold and more spec-compliant 🤔 Restoring the previous |
Sorry, I meant rename interface ChildNode extends ChildNodeBase, Node {} and swap all the uses of
To be honest, I'm leaning the strongest on this one. We can always make that other change sooner, but I am apprehensive about shipping the original break. |
👍 from me for that idea. |
Is there an easy place to fix this? I can see |
You can insert the following somewhere below "mixins": "ChildNode": {
"name": "ChildNodeBase"
} And then somewhere below "interfaces": "ChildNode": {
"name": "ChildNode",
"implements": ["ChildNodeBase", "Node"]
} |
Sorry, I meant to revert the change and go back to the original definitions of |
That should implement your idea #1087 (comment), or did you change your mind? |
I wasn't sure whether it was worth it to define the new |
According to microsoft/TypeScript#45266, there are some breaks around
ChildNode
no longer being a subtype ofNode
. This was also mentioned in Google's 4.4 beta adoption thread (#1067).Some breaks here
In #1067, @saschanaz explained
I may be missing some context of why that's important to have - was there discussion around that? But regardless, I don't know if we can retroactively make that call. If that's a thing users need, does it make sense to create a
ChildNodeBase
and aParentNodeBase
?The text was updated successfully, but these errors were encountered: