mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
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:
Vendored
+2
-2
@@ -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 {
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user