diff --git a/jquery/jquery-tests.ts b/jquery/jquery-tests.ts index 1a9a6dd26..1f723fde3 100644 --- a/jquery/jquery-tests.ts +++ b/jquery/jquery-tests.ts @@ -3359,7 +3359,7 @@ function test_promise_then_change_type() { var def = $.Deferred(); var promise = def.promise(null); - def.rejectWith(this, new Error()); + def.rejectWith(this, [new Error()]); return promise; } diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index ad9e93455..d7688f187 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -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 extends JQueryGenericPromise { * @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; + notifyWith(context: any, value?: any[]): JQueryDeferred; /** * Reject a Deferred object and call any failCallbacks with the given args. @@ -409,7 +409,7 @@ interface JQueryDeferred extends JQueryGenericPromise { * @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; + rejectWith(context: any, value?: any[]): JQueryDeferred; /** * Resolve a Deferred object and call any doneCallbacks with the given args. @@ -425,7 +425,7 @@ interface JQueryDeferred extends JQueryGenericPromise { * @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; + resolveWith(context: any, value?: T[]): JQueryDeferred; /** * Return a Deferred's Promise object. diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index a5f77eade..a49a779e2 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -9,7 +9,7 @@ declare module JQueryUI { // Accordion ////////////////////////////////////////////////// - interface AccordionOptions { + interface AccordionOptions extends AccordionEvents { active?: any; // boolean or number animate?: any; // boolean, number, string or object collapsible?: boolean; @@ -37,7 +37,7 @@ declare module JQueryUI { create?: AccordionEvent; } - interface Accordion extends Widget, AccordionOptions, AccordionEvents { + interface Accordion extends Widget, AccordionOptions { } @@ -342,7 +342,7 @@ declare module JQueryUI { interface DialogOptions extends DialogEvents { autoOpen?: boolean; - buttons?: { [buttonText: string]: (event?: Event) => void } | ButtonOptions[]; + buttons?: { [buttonText: string]: (event?: Event) => void } | DialogButtonOptions[]; closeOnEscape?: boolean; closeText?: string; dialogClass?: string; @@ -366,6 +366,14 @@ declare module JQueryUI { close?: DialogEvent; } + interface DialogButtonOptions { + icons?: any; + showText?: string | boolean; + text?: string; + click?: (eventObject: JQueryEventObject) => any; + [attr: string]: any; // attributes for the