diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index 45baaba789..3d65135f5f 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -2499,7 +2499,7 @@ interface JQueryStatic { * @see {@link https://api.jquery.com/jQuery.Callbacks/} * @since 1.7 */ - Callbacks(flags?: string): JQuery.Callbacks; + Callbacks(flags?: string): JQuery.Callbacks; /** * A factory function that returns a chainable utility object with methods to register multiple * callbacks into callback queues, invoke callback queues, and relay the success or failure state of @@ -4160,15 +4160,16 @@ declare namespace JQuery { // region Callbacks - interface Callbacks { + interface Callbacks { /** * Add a callback or a collection of callbacks to a callback list. * + * @param callback A function, or array of functions, that are to be added to the callback list. * @param callbacks A function, or array of functions, that are to be added to the callback list. * @see {@link https://api.jquery.com/callbacks.add/} * @since 1.7 */ - add(callbacks: TypeOrArray): this; + add(callback: TypeOrArray, ...callbacks: Array>): this; /** * Disable a callback list from doing anything more. * @@ -4206,7 +4207,7 @@ declare namespace JQuery { * @see {@link https://api.jquery.com/callbacks.fireWith/} * @since 1.7 */ - fireWith(context?: object, args?: TypeOrArray): this; + fireWith(context: object, args?: ArrayLike): this; /** * Determine if the callbacks have already been called at least once. * @@ -4222,7 +4223,7 @@ declare namespace JQuery { * @see {@link https://api.jquery.com/callbacks.has/} * @since 1.7 */ - has(callback?: Function): boolean; + has(callback?: T): boolean; /** * Lock a callback list in its current state. * @@ -4244,7 +4245,7 @@ declare namespace JQuery { * @see {@link https://api.jquery.com/callbacks.remove/} * @since 1.7 */ - remove(callbacks: TypeOrArray): this; + remove(...callbacks: T[]): this; } // endregion @@ -4901,7 +4902,7 @@ declare namespace JQuery { // region Legacy types -interface JQueryCallback extends JQuery.Callbacks { } +interface JQueryCallback extends JQuery.Callbacks { } interface JQueryDeferred extends JQuery.Deferred { } interface JQueryEventObject extends JQuery.Event { } interface JQueryEventConstructor extends JQuery.Event { }