borisyankov/DefinitelyTyped — pull request #1289 by johnnyreilly (2013-11-19 12:00:13+00:00)
Title: jQuery:Added generic always/done/fail/progress

Hi Guys,

I've added generic versions of the JQueryPromise callbacks for ```always```, ```done```, ```fail``` and ```progress```. I think that this is correct and I've added a test in for ```done``` to illustrate usage.

I'm approaching this mostly from the perspective of attempting to flow the typings through when using jQuery's AJAX goodness. Essentially this change allows me to write a data service module which allows my ```done``` callbacks to pick up the typing defined in the data service module.

I *think* this is correct (ie - it works in my own project) but I can't help but notice that my implementation is slightly different to the ```then``` implementation. I appreciate that they are not one and the same thing but if I've missed something here then please feel free to set me back on the right path. :-)