mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-28 03:32:56 +00:00
Fix jQuery Deferred and Callback *With-method signatures.
The Callback.fireWith, Deferred.notifyWith, Deferred.rejectWith, and Deferred.resolveWith methods require you to pass the arguments as an array.
This commit is contained in:
parent
6f6e5c7dd9
commit
164fe71822
8
jquery/jquery.d.ts
vendored
8
jquery/jquery.d.ts
vendored
@ -241,7 +241,7 @@ interface JQueryCallback {
|
||||
* @param context A reference to the context in which the callbacks in the list should be fired.
|
||||
* @param arguments An argument, or array of arguments, to pass to the callbacks in the list.
|
||||
*/
|
||||
fireWith(context?: any, ...args: any[]): JQueryCallback;
|
||||
fireWith(context?: any, args: any[]): JQueryCallback;
|
||||
|
||||
/**
|
||||
* Determine whether a supplied callback is in a list
|
||||
@ -395,7 +395,7 @@ interface JQueryDeferred<T> extends JQueryGenericPromise<T> {
|
||||
* @param context Context passed to the progressCallbacks as the this object.
|
||||
* @param args Optional arguments that are passed to the progressCallbacks.
|
||||
*/
|
||||
notifyWith(context: any, value?: any, ...args: any[]): JQueryDeferred<T>;
|
||||
notifyWith(context: any, value?: any[]): JQueryDeferred<T>;
|
||||
|
||||
/**
|
||||
* Reject a Deferred object and call any failCallbacks with the given args.
|
||||
@ -409,7 +409,7 @@ interface JQueryDeferred<T> extends JQueryGenericPromise<T> {
|
||||
* @param context Context passed to the failCallbacks as the this object.
|
||||
* @param args An optional array of arguments that are passed to the failCallbacks.
|
||||
*/
|
||||
rejectWith(context: any, value?: any, ...args: any[]): JQueryDeferred<T>;
|
||||
rejectWith(context: any, value?: any[]): JQueryDeferred<T>;
|
||||
|
||||
/**
|
||||
* Resolve a Deferred object and call any doneCallbacks with the given args.
|
||||
@ -425,7 +425,7 @@ interface JQueryDeferred<T> extends JQueryGenericPromise<T> {
|
||||
* @param context Context passed to the doneCallbacks as the this object.
|
||||
* @param args An optional array of arguments that are passed to the doneCallbacks.
|
||||
*/
|
||||
resolveWith(context: any, value?: T, ...args: any[]): JQueryDeferred<T>;
|
||||
resolveWith(context: any, value?: T[]): JQueryDeferred<T>;
|
||||
|
||||
/**
|
||||
* Return a Deferred's Promise object.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user