Skip to content

Commit 7f8fb4a

Browse files
dbg
1 parent 6f311f1 commit 7f8fb4a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/src/services/ServiceContainer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { DeviceService } from './DeviceService';
22
import { ConsoleService } from './ConsoleService';
33
import { FirmwareService } from './FirmwareService';
44
import { FlashService } from './FlashService';
5+
import { StreamCallback } from './ConsoleService';
56

67
const bootFileName: string = "main.py";
78
const 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
}

0 commit comments

Comments
 (0)