import { Operation } from './json-patch-lib' // revise a collection of nodes. export type Revision = { id: number patch: Operation[] } // dump/replace the entire store with T export type Dump = { id: number; value: T } export type Update = Revision | Dump export enum PatchOp { ADD = 'add', REMOVE = 'remove', REPLACE = 'replace', } export interface Bootstrapper { init(): Promise> update(cache: DBCache): Promise } export interface DBCache> { sequence: number data: T }