Skip to content

Conversation

@usmonster
Copy link
Contributor

(This was discussed on another issue and recommended to be reported separately.)

The signature for the success callback of jQuery.ajax is misleading in that it denotes that the function will be passed a PlainObject as its first argument, even though it is later (and more accurately) noted that the passed argument is "formatted according to the dataType parameter." Indeed, the data can even potentially be of any type if one uses custom converters. The same issue exists for the dataFilter setting's function signature.

These signatures should probably use Anything in place of [Plain]Object.

@usmonster
Copy link
Contributor Author

Anything left to do on this? @rwaldron @scottgonzalez @dmethvin

@dmethvin
Copy link
Member

LGTM

@kswedberg kswedberg closed this in edbc98a Oct 6, 2014
usmonster added a commit to usmonster/closure-compiler that referenced this pull request Nov 4, 2014
- Loosens type of jQuery.each callback's first parameter; common subtype ? preferred to (string|number).
- Deprecates jQuery.support (see jquery/api.jquery.com#454).
- Adds other possible return values to jQuery.parseJSON (see jquery/api.jquery.com#492).
- Loosens return type of `dataFilter` function passed to $.ajax (see jquery/api.jquery.com#492).
- Updates `@see` reference to link to proper issue in old tracker.

Resolves google#694.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants