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
764
764
return JSONExt . deepCopy ( this . _youtputs . toJSON ( ) ) ;
765
765
}
766
766
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 > > = [ ] ;
769
769
for ( const output of outputs ) {
770
770
let _newOutput : { [ id : string ] : any } ;
771
771
const newOutput = new Y . Map ( ) ;
@@ -798,6 +798,17 @@ export class YCodeCell
798
798
} , false ) ;
799
799
}
800
800
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
+
801
812
/**
802
813
* Replace content from `start' to `end` with `outputs`.
803
814
*
@@ -863,7 +874,7 @@ export class YCodeCell
863
874
return changes ;
864
875
}
865
876
866
- private _youtputs : Y . Array < nbformat . IOutput > ;
877
+ private _youtputs : Y . Array < Y . Map < any > > ;
867
878
}
868
879
869
880
class YAttachmentCell
You can’t perform that action at this time.
0 commit comments