@@ -82,6 +82,27 @@ declare module 'vscode' {
82
82
83
83
export type CellOutput = CellStreamOutput | CellErrorOutput | CellDisplayOutput ;
84
84
85
+ export class NotebookCellOutputItem {
86
+
87
+ readonly mime : string ;
88
+ readonly value : unknown ;
89
+ readonly metadata ?: Record < string , string | number | boolean > ;
90
+
91
+ constructor ( mime : string , value : unknown , metadata ?: Record < string , string | number | boolean > ) ;
92
+ }
93
+
94
+ //TODO@jrieken add id?
95
+ export class NotebookCellOutput {
96
+
97
+ readonly outputs : NotebookCellOutputItem [ ] ;
98
+ readonly metadata ?: Record < string , string | number | boolean > ;
99
+
100
+ constructor ( outputs : NotebookCellOutputItem [ ] , metadata ?: Record < string , string | number | boolean > ) ;
101
+
102
+ //TODO@jrieken HACK to workaround dependency issues...
103
+ toJSON ( ) : any ;
104
+ }
105
+
85
106
export enum NotebookCellRunState {
86
107
Running = 1 ,
87
108
Idle = 2 ,
@@ -263,14 +284,14 @@ declare module 'vscode' {
263
284
export interface WorkspaceEdit {
264
285
replaceNotebookMetadata ( uri : Uri , value : NotebookDocumentMetadata ) : void ;
265
286
replaceNotebookCells ( uri : Uri , start : number , end : number , cells : NotebookCellData [ ] , metadata ?: WorkspaceEditEntryMetadata ) : void ;
266
- replaceNotebookCellOutput ( uri : Uri , index : number , outputs : CellOutput [ ] , metadata ?: WorkspaceEditEntryMetadata ) : void ;
287
+ replaceNotebookCellOutput ( uri : Uri , index : number , outputs : ( NotebookCellOutput | CellOutput ) [ ] , metadata ?: WorkspaceEditEntryMetadata ) : void ;
267
288
replaceNotebookCellMetadata ( uri : Uri , index : number , cellMetadata : NotebookCellMetadata , metadata ?: WorkspaceEditEntryMetadata ) : void ;
268
289
}
269
290
270
291
export interface NotebookEditorEdit {
271
292
replaceMetadata ( value : NotebookDocumentMetadata ) : void ;
272
293
replaceCells ( start : number , end : number , cells : NotebookCellData [ ] ) : void ;
273
- replaceCellOutput ( index : number , outputs : CellOutput [ ] ) : void ;
294
+ replaceCellOutput ( index : number , outputs : ( NotebookCellOutput | CellOutput ) [ ] ) : void ;
274
295
replaceCellMetadata ( index : number , metadata : NotebookCellMetadata ) : void ;
275
296
}
276
297
0 commit comments