/** * Official Type definitions for JSS comments * https://jspreadsheet.com/products/comments * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped */ declare function topmenu(user: topmenu.options): void; declare namespace topmenu { interface Items { /** Context menu item type: line | divisor | default */ type?: 'line' | 'divisor' | 'default'; /** Context menu item title */ title: string; /** Context menu icon key. (Material icon key icon identification) */ icon?: string; /** HTML id property of the item DOM element */ id?: string; /** Item is disabled */ disabled?: boolean; /** Onclick event for the contextmenu item */ onclick?: (instance: object, e: MouseEvent) => void; /** A short description or instruction for the item. Normally a shortcut. Ex. CTRL + C */ shortcut?: string; /** Show this text when the user mouse over the element */ tooltip?: string; /** Submenu */ submenu?: Items[]; } interface OptionItem { /** Option title */ title: string; /** Submenu */ submenu?: Items[]; } interface options { /** Items for the contextmenu */ options: OptionItem[], } } export default topmenu;