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';
2
2
import { ConsoleService } from './ConsoleService' ;
3
3
import { FirmwareService } from './FirmwareService' ;
4
4
import { FlashService } from './FlashService' ;
5
+ import { StreamCallback } from './ConsoleService' ;
5
6
6
7
const bootFileName : string = "main.py" ;
7
8
const bootSavePrefix : string = `with open('${ bootFileName } ', 'w') as f:\n f.write('''\n` ;
@@ -51,7 +52,7 @@ export class ServiceContainer {
51
52
52
53
public async saveCodeToDevice (
53
54
codeToSave : string ,
54
- stream : ( content : string ) => void
55
+ stream : ( ( content : string ) => void ) | StreamCallback
55
56
) : Promise < { status : string ; execution_count : number ; ename ?: string ; evalue ?: string ; traceback ?: string [ ] } > {
56
57
if ( ! codeToSave ) {
57
58
return {
@@ -93,8 +94,7 @@ export class ServiceContainer {
93
94
console . log ( `[ServiceContainer] saveCodeToDevice - Code saved successfully` ) ;
94
95
return {
95
96
status : 'ok' ,
96
- execution_count : 0 ,
97
- user_expressions : { } ,
97
+ execution_count : 0
98
98
} ;
99
99
}
100
100
}
You can’t perform that action at this time.
0 commit comments