@loro-dev/flock 4.0.0 → 4.2.0

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.
package/dist/index.d.mts CHANGED
@@ -153,7 +153,21 @@ declare class Flock {
153
153
  */
154
154
  getEntry(key: KeyPart[]): EntryInfo | undefined;
155
155
  merge(other: Flock): void;
156
+ /**
157
+ * Returns the exclusive version vector, which only includes peers that have
158
+ * at least one entry in the current state. This is consistent with the state
159
+ * after export and re-import.
160
+ *
161
+ * Use this version when sending to other peers for incremental sync.
162
+ */
156
163
  version(): VersionVector;
164
+ /**
165
+ * Returns the inclusive version vector, which includes all peers ever seen,
166
+ * even if their entries have been overridden by other peers.
167
+ *
168
+ * Use this version when checking if you have received all data from another peer.
169
+ */
170
+ inclusiveVersion(): VersionVector;
157
171
  private exportJsonInternal;
158
172
  private exportJsonWithHooks;
159
173
  exportJson(): ExportBundle;
package/dist/index.d.ts CHANGED
@@ -153,7 +153,21 @@ declare class Flock {
153
153
  */
154
154
  getEntry(key: KeyPart[]): EntryInfo | undefined;
155
155
  merge(other: Flock): void;
156
+ /**
157
+ * Returns the exclusive version vector, which only includes peers that have
158
+ * at least one entry in the current state. This is consistent with the state
159
+ * after export and re-import.
160
+ *
161
+ * Use this version when sending to other peers for incremental sync.
162
+ */
156
163
  version(): VersionVector;
164
+ /**
165
+ * Returns the inclusive version vector, which includes all peers ever seen,
166
+ * even if their entries have been overridden by other peers.
167
+ *
168
+ * Use this version when checking if you have received all data from another peer.
169
+ */
170
+ inclusiveVersion(): VersionVector;
157
171
  private exportJsonInternal;
158
172
  private exportJsonWithHooks;
159
173
  exportJson(): ExportBundle;