UNPKG

612 BTypeScriptView Raw
1import { Disposable } from "../index";
2
3/** Provides a registry for menu items that you'd like to appear in the application menu. */
4export interface MenuManager {
5 /** Adds the given items to the application menu. */
6 add(items: readonly MenuOptions[]): Disposable;
7
8 /** Refreshes the currently visible menu. */
9 update(): void;
10}
11
12export interface MenuOptions {
13 /** The menu itme's label. */
14 label: string;
15
16 /** An array of sub menus. */
17 submenu?: readonly MenuOptions[] | undefined;
18
19 /** The command to trigger when the item is clicked. */
20 command?: string | undefined;
21}