This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Incorrect function return type for jQuery setter functions #3684
Labels
Comments
ghost
assigned eztierney
May 3, 2013
Reviewed. Marking medium priority to @eztierney for sprint 25 since it seems like a common case. |
I looked through the jQuery docs, and I found 3 methods like this: I didn't see any other methods which looked like they were overloaded like this, but I may have missed some. |
three more -- height, width and html. |
A few more: |
Erik logged a Tern bug, see the comments in ternjs/tern#123. |
Removing Sprint 25 milestone as we're dependent on a fix in Tern |
Was assigned to tern team, so marking "Needs Review". |
dangoor
changed the title
[js code hints] Incorrect function return type for jQuery setter functions.
Incorrect function return type for jQuery setter functions
Apr 24, 2014
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
jQuery has overloaded functions; both setters and getters have the same name, but setters have some extra parameters and most of them return jQuery object for chaining.
$("div").css("display", "none")
.Result: You get hints for string methods instead of jQuery methods.
The text was updated successfully, but these errors were encountered: