b-fuze / deno-dom

Browser DOM & HTML parser in Deno
https://jsr.io/@b-fuze/deno-dom
MIT License
423 stars 47 forks source link

fix: incorrect ts interface #138

Open swarnimarun opened 1 year ago

swarnimarun commented 1 year ago

Creating this as a draft PR for I am sure more changes are required. But I need more understanding of the code base to verify the fix.

But the item should require an Element | null as the HTMLCollection specification, to ensure the types match the behaviour.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection/item#return_value

Will get back to this once I have more time.