forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
28 lines (24 loc) · 1.15 KB
/
types.ts
File metadata and controls
28 lines (24 loc) · 1.15 KB
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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import type { CancellationToken } from 'vscode';
import type {
NotebookCell,
NotebookContentProvider as VSCodeNotebookContentProvider,
NotebookDocument
} from 'vscode-proposed';
export const INotebookExecutionService = Symbol('INotebookExecutionService');
export interface INotebookExecutionService {
cancelPendingExecutions(document: NotebookDocument): void;
executeCell(document: NotebookDocument, cell: NotebookCell, token: CancellationToken): Promise<void>;
executeAllCells(document: NotebookDocument, token: CancellationToken): Promise<void>;
}
export const INotebookContentProvider = Symbol('INotebookContentProvider');
export interface INotebookContentProvider extends VSCodeNotebookContentProvider {
/**
* Notify VS Code that document has changed.
* The change is not something that can be undone by using the `undo`.
* E.g. updating execution count of a cell, or making a notebook readonly, or updating kernel info in ipynb metadata.
*/
notifyChangesToDocument(document: NotebookDocument): void;
}