From 32f803ab6598114eea7547f342a99ad83ac4f011 Mon Sep 17 00:00:00 2001 From: Michael Wittwer Date: Tue, 1 Sep 2015 11:41:51 +0200 Subject: [PATCH] add new method on $httpProvider to define which kind of Promises we like to use (normal vs. decorated with sucess / error) --- angularjs/angular.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 8fd574321..d183167b5 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1452,6 +1452,14 @@ declare module angular { interceptors: any[]; useApplyAsync(): boolean; useApplyAsync(value: boolean): IHttpProvider; + + /** + * + * @param {boolean=} value If true, `$http` will return a normal promise without the `success` and `error` methods. + * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining. + * otherwise, returns the current configured value. + */ + useLegacyPromiseExtensions(value:boolean) : boolean | IHttpProvider; } ///////////////////////////////////////////////////////////////////////////