import { g as Cancel, r as Store, w as SubscribeOptions, y as DisposableCancel } from "./store-Cq1PqvEo.js"; import { n as Patch, t as DiffOptions } from "./diff-CwiTYAVK.js"; //#region src/patches/patchMethods.d.ts interface SyncMessage { fromVersion?: string; toVersion: string; patches: Patch[]; } interface HistoryEntry extends SyncMessage { reversePatches: Patch[]; } declare module ".." { interface Store { __patches?: { value: T; version: string; history: HistoryEntry[]; }; } } interface SubscribePatchOptions extends SubscribeOptions, DiffOptions { /** @default false */ runNow?: boolean; /** try to start from a specific version and only receive patches after that. * If the id is not found, it will start from the beginning */ startAt?: string; } type InteropPatch = Patch | { op: "add" | "replace" | "remove"; value?: any; }; declare function subscribePatches(this: Store, listener: (this: { cancel: Cancel; }, patches: Patch[], reversePatches: Patch[], version: string, previousVersion: string | undefined) => void, options?: SubscribePatchOptions): DisposableCancel; declare function applyPatches(this: Store, patches: InteropPatch[]): void; declare function applyPatches(this: Store, ...patches: InteropPatch[]): void; declare function sync(this: Store, listener: (syncMessage: SyncMessage) => void, options?: Omit): DisposableCancel; declare function acceptSync(this: Store, message: SyncMessage): void; declare const patchMethods: { subscribePatches: typeof subscribePatches; applyPatches: typeof applyPatches; sync: typeof sync; acceptSync: typeof acceptSync; }; //#endregion export { SyncMessage as n, patchMethods as r, SubscribePatchOptions as t }; //# sourceMappingURL=patchMethods-C21iQqML.d.ts.map