2023-05-24 02:53:53 +08:00
|
|
|
import { SysCallMapping } from "../../plugos/system.ts";
|
2023-07-14 22:56:20 +08:00
|
|
|
import type { Client } from "../client.ts";
|
2023-05-24 02:53:53 +08:00
|
|
|
|
2023-07-14 22:56:20 +08:00
|
|
|
export function syncSyscalls(editor: Client): SysCallMapping {
|
2023-05-24 02:53:53 +08:00
|
|
|
return {
|
|
|
|
"sync.isSyncing": (): Promise<boolean> => {
|
2023-07-14 19:44:30 +08:00
|
|
|
return editor.syncService.isSyncing();
|
2023-05-24 02:53:53 +08:00
|
|
|
},
|
|
|
|
"sync.hasInitialSyncCompleted": (): Promise<boolean> => {
|
2023-07-14 19:44:30 +08:00
|
|
|
return editor.syncService.hasInitialSyncCompleted();
|
2023-05-24 02:53:53 +08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|