1
0
silverbullet/web/syscalls/sync.ts

14 lines
411 B
TypeScript
Raw Normal View History

import { SysCallMapping } from "../../plugos/system.ts";
2023-07-14 12:22:26 +00:00
import type { Editor } from "../editor.ts";
2023-07-14 11:44:30 +00:00
export function syncSyscalls(editor: Editor): SysCallMapping {
return {
"sync.isSyncing": (): Promise<boolean> => {
2023-07-14 11:44:30 +00:00
return editor.syncService.isSyncing();
},
"sync.hasInitialSyncCompleted": (): Promise<boolean> => {
2023-07-14 11:44:30 +00:00
return editor.syncService.hasInitialSyncCompleted();
},
};
}