Source: menu.jsdoc

/**
 * Menu options.
 * @typedef {Object} wcMenu~Options
 * @property {external:jQuery~Object|external:jQuery~Selector|external:domNode} [outer='body'] - The outer container element, this is your main container area for the entire window.
 * @property {Object} [data] - A custom data object that will be passed to all event handlers.
 * @property {Boolean} [manualUpdate] - Set true if you want to handle the menu update yourself.
 * @property {String} [version] - A version tag to display in the right margin of the menu bar.
 */

/**
 * On click handler for menu and toolbar options.
 * @callback wcMenu~OnActivation
 * @param {Object} data - The custom data object from {@link wcMenu~Options}.
 */

/**
 * A callback that retrieves the display text for the menu option.
 * @callback wcMenu~MenuDisplayFunc
 * @param {Object} data - The custom data object from {@link wcMenu~Options}.
 * @returns {String}
 */

/**
 * A callback that retrieves the current toggle state of the menu option.
 * @callback wcMenu~MenuToggleFunc
 * @param {Object} data - The custom data object from {@link wcMenu~Options}.
 * @returns {String}
 */

/**
 * A callback that retrieves the icon class for a menu option.
 * @callback wcMenu~MenuIconFunc
 * @param {Object} data - The custom data object from {@link wcMenu~Options}.
 * @returns {String}
 */

/**
 * A callback that retrieves the description string for a menu option.
 * @callback wcMenu~MenuDescriptionFunc
 * @param {Object} data - The custom data object from {@link wcMenu~Options}.
 * @returns {String}
 */

/**
 * Custom options for a menu option.
 * @typedef {Object} wcMenu~MenuOptions
 * @property {wcMenu~MenuToggleFunc} [toggle] - A function that returns the current toggle state of the option.
 * @property {wcMenu~MenuDisplayFunc} [display] - A function that returns the display text that should be shown on the menu option item. If not supplied, the default menu name will be applied.
 * @property {String|wcMenu~MenuIconFunc} [icon] - A classname to apply as an icon for the option.  If this is a function, it will be called during the update call and should return the icon class.
 * @property {String|wcMenu~MenuDescriptionFunc} [description] - The description to show as a tooltip for this option.
 * @property {Number} [itemIndex] - An insertion index to insert the item within the menu category, default is to append to the end.
 * @property {Number} [categoryIndex] - If this creates a new category, it will be inserted at this index in the top level menu.
 * @property {Boolean} [toolbarIndex] - If supplied, creates a toolbar button for this option and inserts it in the tab bar at the specified index. -1 will append it to the end.
 * @property {String} [hotkeys] - A string that describes hotkeys for your control, the format is 'Ctrl+Z' or 'Alt+Shift+L,Shift+L' for multiple.
 * @property {Function} [condition] - A function to call during the update to determine if the menu option should be enabled or disabled. Return false to disable the option.
 * @param {wcMenu~OnActivation} onActivated - A handler to call when the option is activated.
 */