@state-sync/redux-path-reducer
Version:
state-sync client only json path reducer
22 lines (21 loc) • 493 B
TypeScript
export interface PatchOperation {
op: string;
path: string;
value?: string;
from?: string;
}
export declare abstract class Op {
path: string[];
constructor(src: PatchOperation);
abstract apply(json: any): any;
}
export declare class OpSelect extends Op {
private root;
constructor(src: PatchOperation);
apply(json: any): any;
}
export declare class Patch {
private patches;
constructor(src: PatchOperation[]);
apply(json: object): object;
}