Skip to content
Sheetwrite

Sheetwrite / Documentation

IndexedDbPendingCommitStorage@sheetwrite/core/browser

Browser-only durable pending queue.

Browser-only durable pending queue. Import it from @sheetwrite/core/browser; the package's root entrypoint never evaluates IndexedDB globals.

Members 6

constructor
constructor(options?: IndexedDbPendingCommitStorageOptions);
close
close: () => void;
load
load: (documentId: string, options: PendingCommitLoadOptions) => Promise<readonly PendingCommit[]>;
put
put: (commit: PendingCommit, signal?: AbortSignal) => Promise<void>;
remove
remove: (documentId: string, clientMutationId: string, signal?: AbortSignal) => Promise<void>;
replace Atomically replaces one document queue only if its ordered IDs still match the caller's expected view.
replace: (documentId: string, expectedClientMutationIds: readonly string[], commits: readonly PendingCommit[], signal?: AbortSignal) => Promise<void>

Declaration

View full TypeScript declaration
class IndexedDbPendingCommitStorage implements PendingCommitStorage {
constructor(options?: IndexedDbPendingCommitStorageOptions);
close: () => void;
load: (
documentId: string,
options: PendingCommitLoadOptions,
) => Promise<readonly PendingCommit[]>;
put: (commit: PendingCommit, signal?: AbortSignal) => Promise<void>;
remove: (
documentId: string,
clientMutationId: string,
signal?: AbortSignal,
) => Promise<void>;
replace: (
documentId: string,
expectedClientMutationIds: readonly string[],
commits: readonly PendingCommit[],
signal?: AbortSignal,
) => Promise<void>;
}