@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.
19 lines (18 loc) • 482 B
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>;