remove bootstraop and drop alias for dump (#63)

This commit is contained in:
Matt Hill
2024-06-06 07:30:01 -06:00
committed by GitHub
parent 72c62cd525
commit 7aa53249f9
3 changed files with 21 additions and 38 deletions

View File

@@ -1,12 +1,10 @@
import { Operation } from './json-patch-lib'
// revise a collection of nodes.
export type Revision = {
id: number
patch: Operation<unknown>[]
}
// dump/replace the entire store with T
export type Dump<T> = { id: number; value: T }
export type Update<T> = Revision | Dump<T>
@@ -16,13 +14,3 @@ export enum PatchOp {
REMOVE = 'remove',
REPLACE = 'replace',
}
export interface Bootstrapper<T extends Record<string, any>> {
init(): DBCache<T>
update(cache: DBCache<T>): void
}
export interface DBCache<T extends Record<string, any>> {
sequence: number
data: T
}