UNPKG

@gamesberry/karmyc-core

Version:

A flexible and powerful layout management system for React applications

16 lines (15 loc) 454 B
export interface IStateDiff { path: string[]; oldValue: unknown; newValue: unknown; } export declare function generateDiff(prevState: any, nextState: any): IStateDiff[]; export declare function getValueAtPath(state: any, path: string[]): unknown; export declare function applyDiff<T>(state: T, diff: { changes: IStateDiff[]; }): T; export declare function invertDiff(diff: { changes: IStateDiff[]; }): { changes: IStateDiff[]; };