fix build in exthostnotebook

This commit is contained in:
rebornix 2021-02-02 11:21:54 -08:00
parent c3c0db94f3
commit 5ec17aba95

View file

@ -321,23 +321,6 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
this._notebookContentProviders.set(viewType, { extension, provider });
const listeners: vscode.Disposable[] = [];
listeners.push(provider.onDidChangeNotebook
? provider.onDidChangeNotebook(e => {
const document = this._documents.get(URI.revive(e.document.uri));
if (!document) {
throw new Error(`Notebook document ${e.document.uri.toString()} not found`);
}
if (isEditEvent(e)) {
const editId = document.addEdit(e);
this._proxy.$onUndoableContentChange(e.document.uri, viewType, editId, e.label);
} else {
this._proxy.$onContentChange(e.document.uri, viewType);
}
})
: Disposable.None);
listeners.push(provider.onDidChangeNotebookContentOptions
? provider.onDidChangeNotebookContentOptions(() => {
this._proxy.$updateNotebookProviderOptions(viewType, provider.options);
@ -892,11 +875,6 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
}
}
function isEditEvent(e: vscode.NotebookDocumentEditEvent | vscode.NotebookDocumentContentChangeEvent): e is vscode.NotebookDocumentEditEvent {
return typeof (e as vscode.NotebookDocumentEditEvent).undo === 'function'
&& typeof (e as vscode.NotebookDocumentEditEvent).redo === 'function';
}
export class NotebookCellStatusBarItemInternal extends Disposable {
private static NEXT_ID = 0;