Correction of the promise object

http://api.jquery.com/deferred.promise/

The Promise exposes only the Deferred methods needed to attach additional handlers or determine the state (then, done, fail, always, pipe, progress, and state), but not ones that change the state (resolve, reject, notify, resolveWith, rejectWith, and notifyWith).
This commit is contained in:
Oldrich Svec
2012-11-17 13:40:30 +01:00
parent d3d933700f
commit 6c2d697964
+2
View File
@@ -84,6 +84,8 @@ interface JQueryPromise {
always(...alwaysCallbacks: any[]): JQueryDeferred;
done(...doneCallbacks: any[]): JQueryDeferred;
fail(...failCallbacks: any[]): JQueryDeferred;
progress(...progressCallbacks: any[]): JQueryDeferred;
state(): string;
pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise;
then(doneCallbacks: any, failCallbacks: any, progressCallbacks?: any): JQueryDeferred;
}