From fe1d50cbd34382ef45d354aa26d900d8f5d7374b Mon Sep 17 00:00:00 2001 From: rdogmartin Date: Thu, 7 Jan 2016 08:55:23 -0700 Subject: [PATCH] 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. --- jqueryui/jqueryui.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index ade8eb735..7f117cc07 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -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 { }