Skip to content

Conversation

@Fabianopb
Copy link
Contributor

As discussed in microsoft/TypeScript#28551 a Node's nextSibling should have type of ChildNode so types can match when comparing or assigning elements.

I've noticed also nextSibling present in the interface MutationRecord here and in the interface TreeWalker as a method here.

Not sure about those other two occurrences, but at least it seems consistent the change in Node. Let me know if you guys have any comment!

Cheers!

@Fabianopb
Copy link
Contributor Author

Friendly ping @weswigham who added the related issue to https://github.com/Microsoft/TypeScript/milestone/2 some days ago! I'd be happy if someone could give a feedback! :)

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a reasonable improvement even if it's not completely as accurate as @saschanaz' suggestion.

@drivron
Copy link
Contributor

drivron commented Jul 26, 2019

The type of previousSibling should be modified accordingly ...

@jcormont
Copy link

I agree, ran into this recently as well. Open a new issue...?

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

Successfully merging this pull request may close these issues.

4 participants