@dabble/patches 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import type { JSONPatch } from '../json-patch/JSONPatch.js';
1
2
  import type { Change, PatchesSnapshot } from '../types.js';
2
3
  /**
3
4
  * Represents a document synchronized using JSON patches.
@@ -55,7 +56,7 @@ export declare class PatchesDoc<T extends object> {
55
56
  * @param mutator Function modifying a draft state.
56
57
  * @returns The generated Change object or null if no changes occurred.
57
58
  */
58
- change(mutator: (draft: T) => void): Change | null;
59
+ change(mutator: (draft: T, patch: JSONPatch) => void): Change | null;
59
60
  /**
60
61
  * Retrieves pending changes and marks them as sending.
61
62
  * @returns Array of changes ready to be sent to the server.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dabble/patches",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Immutable JSON Patch implementation based on RFC 6902 supporting operational transformation and last-writer-wins",
5
5
  "author": "Jacob Wright <jacwright@gmail.com>",
6
6
  "bugs": {