-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
problems with typescript #783
Comments
Hi @0x0a0d, thanks for opening this, and sorry for never responding. I agree that the current DOM structure isn't ideal, and I am thinking about how to improve it. You point at real issues with the current types, and I'd like to keep the issue open — hope that's okay! |
Okay, let's address this:
|
I found the correct way to do it DomUtils.find(el=> el instanceof Element /* && any conditions */, children, false, 10) as Element[] |
I think most of this has been resolved, even though there are still plenty of casts and type checks that are necessary. |
I got multiple problems when using DomUtils with
typescript
There are cases like these but I can't remember now
How to be clear
Why getElements not return Element[] ?
When will method return Element, Node, NodeWithChildren, ... ?
Thanks
The text was updated successfully, but these errors were encountered: