@orbitinghail/sqlsync-worker
Version:
SQLSync is a collaborative offline-first wrapper around SQLite. It is designed to synchronize web application state between users, devices, and the edge.
26 lines (21 loc) • 494 B
text/typescript
import { DocId, DocRequest, HandlerId, SqlValue } from "../sqlsync-wasm/pkg/sqlsync_wasm";
export interface BootRequest {
tag: "Boot";
handlerId: HandlerId;
coordinatorUrl?: string;
wasmUrl: string;
}
export interface CloseRequest {
tag: "Close";
handlerId: HandlerId;
}
export type WorkerRequest =
| {
tag: "Doc";
handlerId: HandlerId;
docId: DocId;
req: DocRequest;
}
| BootRequest
| CloseRequest;
export type Row = Record<string, SqlValue>;