@@ -82,6 +82,27 @@ declare module 'vscode' {
8282
8383export type CellOutput = CellStreamOutput | CellErrorOutput | CellDisplayOutput ;
8484
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+
85106export enum NotebookCellRunState {
86107Running = 1 ,
87108Idle = 2 ,
@@ -263,14 +284,14 @@ declare module 'vscode' {
263284export interface WorkspaceEdit {
264285replaceNotebookMetadata ( uri : Uri , value : NotebookDocumentMetadata ) : void ;
265286replaceNotebookCells ( 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 ;
267288replaceNotebookCellMetadata ( uri : Uri , index : number , cellMetadata : NotebookCellMetadata , metadata ?: WorkspaceEditEntryMetadata ) : void ;
268289}
269290
270291export interface NotebookEditorEdit {
271292replaceMetadata ( value : NotebookDocumentMetadata ) : void ;
272293replaceCells ( start : number , end : number , cells : NotebookCellData [ ] ) : void ;
273- replaceCellOutput ( index : number , outputs : CellOutput [ ] ) : void ;
294+ replaceCellOutput ( index : number , outputs : ( NotebookCellOutput | CellOutput ) [ ] ) : void ;
274295replaceCellMetadata ( index : number , metadata : NotebookCellMetadata ) : void ;
275296}
276297
0 commit comments