mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 09:35:37 -05:00
Split up NotebookProvider into separate providers for handling file serialization and cell execution. (#17176)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
import * as azdata from 'azdata';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IContentManager } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
|
||||
import { IContentLoader } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
|
||||
import { IStandardKernelWithProvider } from 'sql/workbench/services/notebook/browser/models/notebookUtils';
|
||||
|
||||
export interface INotebookInput {
|
||||
@@ -14,11 +14,12 @@ export interface INotebookInput {
|
||||
isDirty(): boolean;
|
||||
setDirty(boolean);
|
||||
readonly notebookUri: URI;
|
||||
updateModel(): void;
|
||||
updateModel(): Promise<void>;
|
||||
readonly editorOpenedTimestamp: number;
|
||||
readonly layoutChanged: Event<void>;
|
||||
readonly contentManager: IContentManager;
|
||||
readonly contentLoader: IContentLoader;
|
||||
readonly standardKernels: IStandardKernelWithProvider[];
|
||||
readonly providersLoaded: Promise<void>;
|
||||
}
|
||||
|
||||
export function isINotebookInput(value: any): value is INotebookInput {
|
||||
@@ -29,7 +30,7 @@ export function isINotebookInput(value: any): value is INotebookInput {
|
||||
typeof value.isDirty === 'function' &&
|
||||
typeof value.layoutChanged === 'function' &&
|
||||
typeof value.editorOpenedTimestamp === 'number' &&
|
||||
typeof value.contentManager === 'object' &&
|
||||
typeof value.contentLoader === 'object' &&
|
||||
typeof value.standardKernels === 'object') {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user