mobx-keystone-mindreframer
Version:
A MobX powered state management solution based on data trees with first class support for Typescript, snapshots, patches and much more
17 lines (16 loc) • 516 B
TypeScript
import type { Path } from "../parent/pathTypes";
export declare type Patch = PatchAddOperation<any> | PatchRemoveOperation | PatchReplaceOperation<any>;
export interface PatchBaseOperation {
path: Path;
}
export interface PatchAddOperation<T> extends PatchBaseOperation {
op: "add";
value: T;
}
export interface PatchRemoveOperation extends PatchBaseOperation {
op: "remove";
}
export interface PatchReplaceOperation<T> extends PatchBaseOperation {
op: "replace";
value: T;
}