File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { DeviceService } from './DeviceService';
22import { ConsoleService } from './ConsoleService' ;
33import { FirmwareService } from './FirmwareService' ;
44import { FlashService } from './FlashService' ;
5+ import { StreamCallback } from './ConsoleService' ;
56
67const bootFileName : string = "main.py" ;
78const bootSavePrefix : string = `with open('${ bootFileName } ', 'w') as f:\n f.write('''\n` ;
@@ -51,7 +52,7 @@ export class ServiceContainer {
5152
5253 public async saveCodeToDevice (
5354 codeToSave : string ,
54- stream : ( content : string ) => void
55+ stream : ( ( content : string ) => void ) | StreamCallback
5556 ) : Promise < { status : string ; execution_count : number ; ename ?: string ; evalue ?: string ; traceback ?: string [ ] } > {
5657 if ( ! codeToSave ) {
5758 return {
@@ -93,8 +94,7 @@ export class ServiceContainer {
9394 console . log ( `[ServiceContainer] saveCodeToDevice - Code saved successfully` ) ;
9495 return {
9596 status : 'ok' ,
96- execution_count : 0 ,
97- user_expressions : { } ,
97+ execution_count : 0
9898 } ;
9999 }
100100}
You can’t perform that action at this time.
0 commit comments