{"action":"created","issue":{"url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/issues/4888","labels_url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/issues/4888/labels{/name}","comments_url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/issues/4888/comments","events_url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/issues/4888/events","html_url":"https://github.com/borisyankov/DefinitelyTyped/issues/4888","id":94385227,"number":4888,"title":"JQuery $.when is typed incorrectly","user":{"login":"JohnGalt1717","id":1868147,"avatar_url":"https://avatars.githubusercontent.com/u/1868147?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnGalt1717","html_url":"https://github.com/JohnGalt1717","followers_url":"https://api.github.com/users/JohnGalt1717/followers","following_url":"https://api.github.com/users/JohnGalt1717/following{/other_user}","gists_url":"https://api.github.com/users/JohnGalt1717/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnGalt1717/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnGalt1717/subscriptions","organizations_url":"https://api.github.com/users/JohnGalt1717/orgs","repos_url":"https://api.github.com/users/JohnGalt1717/repos","events_url":"https://api.github.com/users/JohnGalt1717/events{/privacy}","received_events_url":"https://api.github.com/users/JohnGalt1717/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-10T20:28:02Z","updated_at":"2015-07-13T14:55:51Z","closed_at":"2015-07-13T14:53:55Z","body":"It's using generics to define the done values that come back. The problem is that it's assuming all promises passed into it will be of the same type which is not valid. The types can all be different."},"comment":{"url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/issues/comments/120956974","html_url":"https://github.com/borisyankov/DefinitelyTyped/issues/4888#issuecomment-120956974","issue_url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/issues/4888","id":120956974,"user":{"login":"JohnGalt1717","id":1868147,"avatar_url":"https://avatars.githubusercontent.com/u/1868147?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnGalt1717","html_url":"https://github.com/JohnGalt1717","followers_url":"https://api.github.com/users/JohnGalt1717/followers","following_url":"https://api.github.com/users/JohnGalt1717/following{/other_user}","gists_url":"https://api.github.com/users/JohnGalt1717/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnGalt1717/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnGalt1717/subscriptions","organizations_url":"https://api.github.com/users/JohnGalt1717/orgs","repos_url":"https://api.github.com/users/JohnGalt1717/repos","events_url":"https://api.github.com/users/JohnGalt1717/events{/privacy}","received_events_url":"https://api.github.com/users/JohnGalt1717/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T14:55:51Z","updated_at":"2015-07-13T14:55:51Z","body":"Either put it back the way it was where the result types were <any> so that it works properly and doesn't require a hack, or make every return type a different Type based on the parameters passed into the function. (don't know if this is possible)\r\n\r\nBut the way it is right now would not work for 99% of the uses of $.when so you're requiring it to be hacked essentially all of the time."}}