diff --git a/jqueryui/jqueryui-tests.ts b/jqueryui/jqueryui-tests.ts index ef02b40d61..d7c85d2283 100644 --- a/jqueryui/jqueryui-tests.ts +++ b/jqueryui/jqueryui-tests.ts @@ -1425,12 +1425,13 @@ function test_dialog() { height: 300, width: 350, modal: true, - buttons: {}, - Cancel: function () { - $(this).dialog("close"); - }, - close: function () { - var $el = $(this).dialog("destroy"); + buttons: { + Cancel: function () { + $(this).dialog("close"); + }, + close: function () { + var $el = $(this).dialog("destroy"); + } } }); $("#dialog-message").dialog({ diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index 6315b35476..e13754feb1 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -336,9 +336,9 @@ declare module JQueryUI { // Dialog ////////////////////////////////////////////////// - interface DialogOptions { + interface DialogOptions extends DialogEvents { autoOpen?: boolean; - buttons?: any; // object or [] + buttons?: { [buttonText: string]: () => void } | ButtonOptions[]; closeOnEscape?: boolean; closeText?: string; dialogClass?: string; @@ -382,7 +382,7 @@ declare module JQueryUI { resizeStop?: DialogEvent; } - interface Dialog extends Widget, DialogOptions, DialogEvents { + interface Dialog extends Widget, DialogOptions { }