mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 19:09:18 +08:00
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:
10
jquery/jquery.d.ts
vendored
10
jquery/jquery.d.ts
vendored
@@ -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>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user