Update jquery.d.ts

- deferred.fail() always returns the deferred object, ergo the failfilter can return anything
- taking in the value parameter for a donefilter is optional
- if a donefilter does not return anything, then the 'then' function continues with a void promise
This commit is contained in:
Bobdina
2015-03-23 11:15:22 +01:00
parent bba34156c1
commit dc067ac82c

10
jquery/jquery.d.ts vendored
View File

@@ -276,7 +276,15 @@ interface JQueryGenericPromise<T> {
* @param doneFilter A function that is called when the Deferred is resolved.
* @param failFilter An optional function that is called when the Deferred is rejected.
*/
then<U>(doneFilter: (value: T, ...values: any[]) => U|JQueryPromise<U>, failFilter?: (...reasons: any[]) => U|JQueryPromise<U>, progressFilter?: (...progression: any[]) => any): JQueryPromise<U>;
then<U>(doneFilter: (value?: T, ...values: any[]) => U|JQueryPromise<U>, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<U>;
/**
* Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
*
* @param doneFilter A function that is called when the Deferred is resolved.
* @param failFilter An optional function that is called when the Deferred is rejected.
*/
then(doneFilter: (value?: T, ...values: any[]) => void, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<void>;
}
/**