-
Notifications
You must be signed in to change notification settings - Fork 31.9k
/
Copy pathvscode.proposed.notebookExecution.d.ts
39 lines (35 loc) · 1.51 KB
/
vscode.proposed.notebookExecution.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'vscode' {
/**
* A NotebookExecution is how {@link NotebookController notebook controller} can indicate whether the notebook controller is busy or not.
*
* When {@linkcode NotebookExecution.start start()} is called on the execution task, it causes the Notebook to enter a executing state .
* When {@linkcode NotebookExecution.end end()} is called, it enters the idle state.
*/
export interface NotebookExecution {
/**
* Signal that the execution has begun.
*/
start(): void;
/**
* Signal that execution has ended.
*/
end(): void;
}
export interface NotebookController {
/**
* Create an execution task.
*
* _Note_ that there can only be one execution per Notebook, that also includes NotebookCellExecutions and t an error is thrown if
* a cell execution or another NotebookExecution is created while another is still active.
*
* This should be used to indicate the {@link NotebookController notebook controller} is busy even though user may not have executed any cell though the UI.
* @param notebook
* @returns A notebook execution.
*/
createNotebookExecution(notebook: NotebookDocument): NotebookExecution;
}
}