@cuboapp/crdt 1.0.25 → 1.0.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuboapp/crdt",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "CRDT for CUBO",
5
5
  "main": "src/index.ts",
6
6
  "repository": {
@@ -425,15 +425,13 @@ export class CuboCrdtClient<M> {
425
425
  }
426
426
  }
427
427
 
428
- public update<K extends string>(
428
+ public update<K extends Extract<keyof M, string>>(
429
429
  entity: K,
430
430
  entity_id: number,
431
431
  dto: K extends Extract<keyof M, string> ? Partial<M[K]> : object,
432
432
  opts?: CuboCrdtClientDocOrigin
433
433
  ) {
434
- const storeKey = `${entity}:${entity_id}`
435
-
436
- const document = this.docs.get(storeKey)
434
+ const document = this.docs.get(`${entity}:${entity_id}`)
437
435
 
438
436
  if (document) {
439
437
  const map = document.doc.getMap()