question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ChildNode/ParentNode no longer extending Node

See original GitHub issue

According to https://github.com/microsoft/TypeScript/issues/45266, there are some breaks around ChildNode no longer being a subtype of Node. This was also mentioned in Google’s 4.4 beta adoption thread (#1067).

Some breaks here

ant-design/ant-design

tsconfig.json

sindresorhus/refined-github

tsconfig.json

In #1067, @saschanaz explained

It’s a mixin interface implemented by some Node interfaces. The correct way to receive Nodes that can be children is ChildNode & Node, just like ParentNode & Node for Nodes that can be parents.

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 a ParentNodeBase?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
DanielRosenwassercommented, Aug 3, 2021

I wasn’t sure whether it was worth it to define the new *Base types, so I’ve left them out for now. I figured that if it’s really broadly needed, we could introduce them in 4.5.

0reactions
saschanazcommented, Aug 3, 2021

That should implement your idea https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1087#issuecomment-891333791, or did you change your mind?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parent nodes rendered as normal node when all children are ...
I am currently trying to edit the expand-collapse extension, in order to set collapsed nodes to display: none, instead of removing them from ......
Read more >
nodes around parent node, instead of just on one side
It's annoying all the children nodes are on one side of the parent nodes. Ideally nodes are around the parent node for better...
Read more >
Please confirm, if i unmanage the parent node, all child nodes ...
Is there a way to view devices in a tree with A node listed, and when you expand it the devices connected to...
Read more >
How to identify child nodes using the Linksys app
The parent node is the first node on the list of nodes and all others are considered child nodes. If your other nodes...
Read more >
Tree View Only Expanding for First Node - Oracle Communities
The parent node that is expanded continues to operate normally and can be collapsed and expanded however no other parent node can be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found