add angularjs $q.when() overloads (#11961)

This commit is contained in:
Stepan Riha
2016-10-16 08:39:26 -05:00
committed by Masahiro Wakame
parent b9ac2a9ffd
commit d7da3c0213
2 changed files with 23 additions and 0 deletions

View File

@@ -1041,6 +1041,7 @@ declare namespace angular {
* @param value Value or a promise
*/
when<T>(value: IPromise<T>|T): IPromise<T>;
when<TResult, T>(value: IPromise<T>|T, successCallback: (promiseValue: T) => IPromise<TResult>|TResult, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise<TResult>;
/**
* Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
*/