borisyankov/DefinitelyTyped — pull request #857 by santialbo (2013-08-13 21:50:50+00:00)
Title: restangular: Fix type signatures for methods that return an IPromise

Last merged pull request on AngularJS type definition (#851) made ng.IPromises generic. This broke the current type definition for restangular.

I decided to use `IPromise` as a return type although I considered making both `RestangularElement` and `RestangularCollection` generic and return and `IPromise`. The reason why I didn't decided to go that way is because methods that return promises add extra useful methods to the element returned by the promise (see https://github.com/mgonto/restangular/blob/master/src/restangular.js#L586-L625) and thus, it would not be right for it to have type T. If there is a better approach to solve this problem, please tell me and I will do my best to correct it.