Added overload for IPromise.then that will retain IHttpPromise type result

This commit is contained in:
Georgios Diamantopoulos
2013-08-29 16:48:36 +03:00
parent 7081b41df4
commit a0b3d5f130
+1
View File
@@ -406,6 +406,7 @@ declare module ng {
}
interface IPromise<T> {
then<TResult>(successCallback: (promiseValue: T) => IHttpPromise<TResult>, errorCallback?: (reason: any) => any): IHttpPromise<TResult>;
then<TResult>(successCallback: (promiseValue: T) => IPromise<TResult>, errorCallback?: (reason: any) => any): IPromise<TResult>;
then<TResult>(successCallback: (promiseValue: T) => TResult, errorCallback?: (reason: any) => TResult): IPromise<TResult>;
}