Make MenuOptions extend MenuEvents

The menu widget definition does not allow a MenuEvents object to be passed to it during initialization. For example, this gives an error from TypeScript:

$el.menu({select: (e, ui) => { }});

I modified the MenuOptions definition to extend MenuEvents and removed MenuEvents from the Menu interface definition. This makes it consistent with how the other widgets are defined and allows both options and events to be defined when creating a menu widget.
This commit is contained in:
rdogmartin
2016-01-07 08:55:23 -07:00
parent 81b951f1ac
commit fe1d50cbd3
+2 -2
View File
@@ -498,7 +498,7 @@ declare module JQueryUI {
// Menu //////////////////////////////////////////////////
interface MenuOptions {
interface MenuOptions extends MenuEvents {
disabled?: boolean;
icons?: any;
menus?: string;
@@ -520,7 +520,7 @@ declare module JQueryUI {
select?: MenuEvent;
}
interface Menu extends Widget, MenuOptions, MenuEvents {
interface Menu extends Widget, MenuOptions {
}