Files
patch-db/client/lib/types.ts
2024-06-06 07:30:01 -06:00

17 lines
292 B
TypeScript

import { Operation } from './json-patch-lib'
export type Revision = {
id: number
patch: Operation<unknown>[]
}
export type Dump<T> = { id: number; value: T }
export type Update<T> = Revision | Dump<T>
export enum PatchOp {
ADD = 'add',
REMOVE = 'remove',
REPLACE = 'replace',
}