UNPKG

1.23 kBTypeScriptView Raw
1import { IRankedMenu, RankedMenu } from '@jupyterlab/ui-components';
2import { SemanticCommand } from '@jupyterlab/apputils';
3/**
4 * An interface for a Run menu.
5 */
6export interface IRunMenu extends IRankedMenu {
7 /**
8 * Semantic commands ICodeRunner for the Run menu.
9 */
10 readonly codeRunners: IRunMenu.ICodeRunner;
11}
12/**
13 * An extensible Run menu for the application.
14 */
15export declare class RunMenu extends RankedMenu implements IRunMenu {
16 /**
17 * Construct the run menu.
18 */
19 constructor(options: IRankedMenu.IOptions);
20 /**
21 * Semantic commands ICodeRunner for the Run menu.
22 */
23 readonly codeRunners: IRunMenu.ICodeRunner;
24}
25/**
26 * A namespace for RunMenu statics.
27 */
28export declare namespace IRunMenu {
29 /**
30 * An object that runs code, which may be
31 * registered with the Run menu.
32 */
33 interface ICodeRunner {
34 /**
35 * A semantic command to run a subpart of a document.
36 */
37 run: SemanticCommand;
38 /**
39 * A semantic command to run a whole document
40 */
41 runAll: SemanticCommand;
42 /**
43 * A semantic command to restart a kernel
44 */
45 restart: SemanticCommand;
46 }
47}