-
Notifications
You must be signed in to change notification settings - Fork 441
fix querySelector typings #357
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
Conversation
Why is that PR needed? |
This method is overloaded, other elements can be retrieved with that method, not only SVG instances. My PR fix wrong typings when retriving other elements such as |
but you removed the generic one that was a catch-all for both I am not sure i understand the issue, can you elaborate on what this change achieves? Also for future references, please file a bug under https://github.com/Microsoft/TypeScript/issues first. |
Problem is that Any comments? maybe problem is on |
You can do |
IMO using generics isn't a good solution. |
By the way HTMLElement as a generic doesn't work either bcoz you have to specificly say what type you expect |
I just checked that both The real problem is on |
Maybe I should close this PR and create another $ inputfiles/addedTypes.json
|
@HolgerJeromin I get your point. Because generics aren't working with that signature The only workarround is to use a Type alias. And isn't enough for me |
@k1r0s |
@HolgerJeromin try it by yourself. Isn't working because you have this signature:
|
@k1r0s I did with ts2.6.3 with strictNullCheck active
|
yep @HolgerJeromin didn't try latest version. Thanks |
@k1r0s This is new with 2.6 |
very nice. Indeed! |
No description provided.