mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 02:11:54 +00:00
remove bootstraop and drop alias for dump (#63)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user