File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -764,8 +764,8 @@ export class YCodeCell
764764 return JSONExt . deepCopy ( this . _youtputs . toJSON ( ) ) ;
765765 }
766766
767- createOutputs ( outputs : Array < nbformat . IOutput > ) : Array < any > {
768- const newOutputs : Array < any > = [ ] ;
767+ createOutputs ( outputs : Array < nbformat . IOutput > ) : Array < Y . Map < any > > {
768+ const newOutputs : Array < Y . Map < any > > = [ ] ;
769769 for ( const output of outputs ) {
770770 let _newOutput : { [ id : string ] : any } ;
771771 const newOutput = new Y . Map ( ) ;
@@ -798,6 +798,17 @@ export class YCodeCell
798798 } , false ) ;
799799 }
800800
801+ /**
802+ * Push text to a stream output.
803+ */
804+ pushStreamOutput ( index : number , text : string ) : void {
805+ this . transact ( ( ) => {
806+ const output = this . _youtputs . get ( index ) ;
807+ const prevText = output . get ( 'text' ) as Y . Array < string > ;
808+ prevText . push ( [ text ] ) ;
809+ } , false ) ;
810+ }
811+
801812 /**
802813 * Replace content from `start' to `end` with `outputs`.
803814 *
@@ -863,7 +874,7 @@ export class YCodeCell
863874 return changes ;
864875 }
865876
866- private _youtputs : Y . Array < nbformat . IOutput > ;
877+ private _youtputs : Y . Array < Y . Map < any > > ;
867878}
868879
869880class YAttachmentCell
You can’t perform that action at this time.
0 commit comments