@loro-dev/flock 4.4.5 → 4.5.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
@@ -130,6 +130,7 @@ declare class Flock {
130
130
  checkInvariants(): void;
131
131
  setPeerId(peerId: string): void;
132
132
  private putWithMetaInternal;
133
+ private putWithMetaPrepared;
133
134
  private putWithMetaWithHooks;
134
135
  /**
135
136
  * Put a value into the flock. If the given entry already exists, this insert will be skipped.
@@ -137,9 +138,9 @@ declare class Flock {
137
138
  * @param value
138
139
  * @param now
139
140
  */
140
- put(key: KeyPart[], value: Value, now?: number): void;
141
- putWithMeta(key: KeyPart[], value: Value, options?: PutWithMetaOptions): void | Promise<void>;
142
- set(key: KeyPart[], value: Value, now?: number): void;
141
+ put(key: KeyPart[], value: Value | undefined, now?: number): void;
142
+ putWithMeta(key: KeyPart[], value: Value | undefined, options?: PutWithMetaOptions): void | Promise<void>;
143
+ set(key: KeyPart[], value: Value | undefined, now?: number): void;
143
144
  /**
144
145
  * Delete a value from the flock. If the given entry does not exist, this delete will be skipped.
145
146
  * @param key
package/dist/index.d.ts CHANGED
@@ -130,6 +130,7 @@ declare class Flock {
130
130
  checkInvariants(): void;
131
131
  setPeerId(peerId: string): void;
132
132
  private putWithMetaInternal;
133
+ private putWithMetaPrepared;
133
134
  private putWithMetaWithHooks;
134
135
  /**
135
136
  * Put a value into the flock. If the given entry already exists, this insert will be skipped.
@@ -137,9 +138,9 @@ declare class Flock {
137
138
  * @param value
138
139
  * @param now
139
140
  */
140
- put(key: KeyPart[], value: Value, now?: number): void;
141
- putWithMeta(key: KeyPart[], value: Value, options?: PutWithMetaOptions): void | Promise<void>;
142
- set(key: KeyPart[], value: Value, now?: number): void;
141
+ put(key: KeyPart[], value: Value | undefined, now?: number): void;
142
+ putWithMeta(key: KeyPart[], value: Value | undefined, options?: PutWithMetaOptions): void | Promise<void>;
143
+ set(key: KeyPart[], value: Value | undefined, now?: number): void;
143
144
  /**
144
145
  * Delete a value from the flock. If the given entry does not exist, this delete will be skipped.
145
146
  * @param key