import { Operation } from './core.js'; export interface Observer { object: T; patches: Operation[]; unobserve: () => void; callback: (patches: Operation[]) => void; } /** * Detach an observer from an object */ export declare function unobserve(root: T, observer: Observer): void; /** * Observes changes made to an object, which can then be retrieved using generate */ export declare function observe(obj: Object | Array, callback?: (patches: Operation[]) => void): Observer; /** * Generate an array of patches from an observer */ export declare function generate(observer: Observer, invertible?: boolean): Operation[]; /** * Create an array of patches from the differences in two objects */ export declare function compare(tree1: Object | Array, tree2: Object | Array, invertible?: boolean): Operation[];