diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 4245c92aeb0..d9ea32966c3 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1062,12 +1062,19 @@ declare module 'vscode' { readonly uri: Uri; readonly version: number; + /** @deprecated Use `uri` instead */ // todo@API don't have this... readonly fileName: string; readonly isDirty: boolean; readonly isUntitled: boolean; + /** + * `true` if the notebook has been closed. A closed notebook isn't synchronized anymore + * and won't be re-used when the same resource is opened again. + */ + readonly isClosed: boolean; + readonly metadata: NotebookDocumentMetadata; // todo@API should we really expose this? diff --git a/src/vs/workbench/api/common/extHostNotebookDocument.ts b/src/vs/workbench/api/common/extHostNotebookDocument.ts index aaf7203dfd2..4db521e3880 100644 --- a/src/vs/workbench/api/common/extHostNotebookDocument.ts +++ b/src/vs/workbench/api/common/extHostNotebookDocument.ts @@ -177,6 +177,7 @@ export class ExtHostNotebookDocument extends Disposable { get viewType() { return that._viewType; }, get isDirty() { return that._isDirty; }, get isUntitled() { return that.uri.scheme === Schemas.untitled; }, + get isClosed() { return that._disposed; }, get metadata() { return that._metadata; }, set metadata(_value: Required) { throw new Error('Use WorkspaceEdit to update metadata.'); }, get cells(): ReadonlyArray { return that._cells.map(cell => cell.cell); },