Skip to content
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

NodeListOf#item should return TNode | null #43

Closed
Andyuu opened this issue Jul 9, 2024 · 2 comments · Fixed by #44
Closed

NodeListOf#item should return TNode | null #43

Andyuu opened this issue Jul 9, 2024 · 2 comments · Fixed by #44
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Andyuu
Copy link

Andyuu commented Jul 9, 2024

Regarding this issue: microsoft/TypeScript-DOM-lib-generator#1268

Real return type: https://developer.mozilla.org/en-US/docs/Web/API/NodeList/item

It would be much better for item() in NodeListOf to match behaviour with at() for arrays. The small difference is that it can return null instead of undefined.

@uhyo
Copy link
Owner

uhyo commented Jul 9, 2024

Given that the linked issue says that it cannot be changed upstream because of backwards compabitility, I would love to accept this change.

@uhyo uhyo added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jul 9, 2024
@uhyo uhyo closed this as completed in #44 Jul 15, 2024
@uhyo
Copy link
Owner

uhyo commented Jul 16, 2024

A fix has been released as v2.8.0. Thank you for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants