@fluidframework/map 2.0.0-internal.7.0.0 → 2.0.0-internal.7.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/api-extractor.json +1 -1
  3. package/api-report/map.api.md +299 -0
  4. package/dist/directory.d.ts +28 -4
  5. package/dist/directory.d.ts.map +1 -1
  6. package/dist/directory.js +13 -10
  7. package/dist/directory.js.map +1 -1
  8. package/dist/interfaces.d.ts +23 -1
  9. package/dist/interfaces.d.ts.map +1 -1
  10. package/dist/interfaces.js.map +1 -1
  11. package/dist/localValues.d.ts +4 -0
  12. package/dist/localValues.d.ts.map +1 -1
  13. package/dist/localValues.js +2 -0
  14. package/dist/localValues.js.map +1 -1
  15. package/dist/map.d.ts +3 -0
  16. package/dist/map.d.ts.map +1 -1
  17. package/dist/map.js +3 -0
  18. package/dist/map.js.map +1 -1
  19. package/dist/packageVersion.d.ts +1 -1
  20. package/dist/packageVersion.js +1 -1
  21. package/dist/packageVersion.js.map +1 -1
  22. package/dist/tsdoc-metadata.json +1 -1
  23. package/lib/directory.d.ts +28 -4
  24. package/lib/directory.d.ts.map +1 -1
  25. package/lib/directory.js +13 -10
  26. package/lib/directory.js.map +1 -1
  27. package/lib/interfaces.d.ts +23 -1
  28. package/lib/interfaces.d.ts.map +1 -1
  29. package/lib/interfaces.js.map +1 -1
  30. package/lib/localValues.d.ts +4 -0
  31. package/lib/localValues.d.ts.map +1 -1
  32. package/lib/localValues.js +2 -0
  33. package/lib/localValues.js.map +1 -1
  34. package/lib/map.d.ts +3 -0
  35. package/lib/map.d.ts.map +1 -1
  36. package/lib/map.js +3 -0
  37. package/lib/map.js.map +1 -1
  38. package/lib/packageVersion.d.ts +1 -1
  39. package/lib/packageVersion.js +1 -1
  40. package/lib/packageVersion.js.map +1 -1
  41. package/package.json +24 -25
  42. package/src/directory.ts +41 -16
  43. package/src/interfaces.ts +23 -1
  44. package/src/localValues.ts +4 -0
  45. package/src/map.ts +3 -0
  46. package/src/packageVersion.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @fluidframework/map
2
2
 
3
+ ## 2.0.0-internal.7.2.0
4
+
5
+ Dependency updates only.
6
+
7
+ ## 2.0.0-internal.7.1.0
8
+
9
+ Dependency updates only.
10
+
3
11
  ## 2.0.0-internal.7.0.0
4
12
 
5
13
  ### Major Changes
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "@fluidframework/build-common/api-extractor-common-strict.json"
3
+ "extends": "@fluidframework/build-common/api-extractor-base.json"
4
4
  }
@@ -0,0 +1,299 @@
1
+ ## API Report File for "@fluidframework/map"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { IChannelAttributes } from '@fluidframework/datastore-definitions';
8
+ import { IChannelFactory } from '@fluidframework/datastore-definitions';
9
+ import { IChannelServices } from '@fluidframework/datastore-definitions';
10
+ import { IChannelStorageService } from '@fluidframework/datastore-definitions';
11
+ import { IDisposable } from '@fluidframework/core-interfaces';
12
+ import { IEvent } from '@fluidframework/core-interfaces';
13
+ import { IEventProvider } from '@fluidframework/core-interfaces';
14
+ import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
15
+ import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
16
+ import { IFluidHandle } from '@fluidframework/core-interfaces';
17
+ import { IFluidSerializer } from '@fluidframework/shared-object-base';
18
+ import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
19
+ import { ISharedObject } from '@fluidframework/shared-object-base';
20
+ import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
21
+ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
22
+ import { ITelemetryContext } from '@fluidframework/runtime-definitions';
23
+ import { SharedObject } from '@fluidframework/shared-object-base';
24
+
25
+ // @public @sealed
26
+ export class DirectoryFactory implements IChannelFactory {
27
+ // (undocumented)
28
+ static readonly Attributes: IChannelAttributes;
29
+ // (undocumented)
30
+ get attributes(): IChannelAttributes;
31
+ // (undocumented)
32
+ create(runtime: IFluidDataStoreRuntime, id: string): ISharedDirectory;
33
+ // (undocumented)
34
+ load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedDirectory>;
35
+ // (undocumented)
36
+ static readonly Type = "https://graph.microsoft.com/types/directory";
37
+ // (undocumented)
38
+ get type(): string;
39
+ }
40
+
41
+ // @public
42
+ export interface ICreateInfo {
43
+ ccIds: string[];
44
+ csn: number;
45
+ }
46
+
47
+ // @public
48
+ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> {
49
+ readonly absolutePath: string;
50
+ countSubDirectory?(): number;
51
+ createSubDirectory(subdirName: string): IDirectory;
52
+ deleteSubDirectory(subdirName: string): boolean;
53
+ get<T = any>(key: string): T | undefined;
54
+ getSubDirectory(subdirName: string): IDirectory | undefined;
55
+ getWorkingDirectory(relativePath: string): IDirectory | undefined;
56
+ hasSubDirectory(subdirName: string): boolean;
57
+ set<T = unknown>(key: string, value: T): this;
58
+ subdirectories(): IterableIterator<[string, IDirectory]>;
59
+ }
60
+
61
+ // @public
62
+ export interface IDirectoryClearOperation {
63
+ path: string;
64
+ type: "clear";
65
+ }
66
+
67
+ // @public
68
+ export interface IDirectoryCreateSubDirectoryOperation {
69
+ path: string;
70
+ subdirName: string;
71
+ type: "createSubDirectory";
72
+ }
73
+
74
+ // @public
75
+ export interface IDirectoryDataObject {
76
+ ci?: ICreateInfo;
77
+ storage?: {
78
+ [key: string]: ISerializableValue;
79
+ };
80
+ subdirectories?: {
81
+ [subdirName: string]: IDirectoryDataObject;
82
+ };
83
+ }
84
+
85
+ // @public
86
+ export interface IDirectoryDeleteOperation {
87
+ key: string;
88
+ path: string;
89
+ type: "delete";
90
+ }
91
+
92
+ // @public
93
+ export interface IDirectoryDeleteSubDirectoryOperation {
94
+ path: string;
95
+ subdirName: string;
96
+ type: "deleteSubDirectory";
97
+ }
98
+
99
+ // @public
100
+ export interface IDirectoryEvents extends IEvent {
101
+ (event: "containedValueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
102
+ (event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
103
+ (event: "subDirectoryDeleted", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
104
+ (event: "disposed", listener: (target: IEventThisPlaceHolder) => void): any;
105
+ (event: "undisposed", listener: (target: IEventThisPlaceHolder) => void): any;
106
+ }
107
+
108
+ // @public
109
+ export type IDirectoryKeyOperation = IDirectorySetOperation | IDirectoryDeleteOperation;
110
+
111
+ // @internal
112
+ export interface IDirectoryNewStorageFormat {
113
+ blobs: string[];
114
+ content: IDirectoryDataObject;
115
+ }
116
+
117
+ // @public
118
+ export type IDirectoryOperation = IDirectoryStorageOperation | IDirectorySubDirectoryOperation;
119
+
120
+ // @public
121
+ export interface IDirectorySetOperation {
122
+ key: string;
123
+ path: string;
124
+ type: "set";
125
+ value: ISerializableValue;
126
+ }
127
+
128
+ // @public
129
+ export type IDirectoryStorageOperation = IDirectoryKeyOperation | IDirectoryClearOperation;
130
+
131
+ // @public
132
+ export type IDirectorySubDirectoryOperation = IDirectoryCreateSubDirectoryOperation | IDirectoryDeleteSubDirectoryOperation;
133
+
134
+ // @public
135
+ export interface IDirectoryValueChanged extends IValueChanged {
136
+ path: string;
137
+ }
138
+
139
+ // @public
140
+ export interface ILocalValue {
141
+ makeSerialized(serializer: IFluidSerializer, bind: IFluidHandle): ISerializedValue;
142
+ readonly type: string;
143
+ readonly value: any;
144
+ }
145
+
146
+ // @public @deprecated
147
+ export interface ISerializableValue {
148
+ type: string;
149
+ value: any;
150
+ }
151
+
152
+ // @public
153
+ export interface ISerializedValue {
154
+ type: string;
155
+ value: string | undefined;
156
+ }
157
+
158
+ // @public
159
+ export interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>, Omit<IDirectory, "on" | "once" | "off"> {
160
+ // (undocumented)
161
+ [Symbol.iterator](): IterableIterator<[string, any]>;
162
+ // (undocumented)
163
+ readonly [Symbol.toStringTag]: string;
164
+ }
165
+
166
+ // @public
167
+ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
168
+ (event: "valueChanged", listener: (changed: IDirectoryValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
169
+ (event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
170
+ (event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
171
+ (event: "subDirectoryDeleted", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
172
+ }
173
+
174
+ // @public
175
+ export interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {
176
+ get<T = any>(key: string): T | undefined;
177
+ set<T = unknown>(key: string, value: T): this;
178
+ }
179
+
180
+ // @public
181
+ export interface ISharedMapEvents extends ISharedObjectEvents {
182
+ (event: "valueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
183
+ (event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
184
+ }
185
+
186
+ // @public
187
+ export interface IValueChanged {
188
+ key: string;
189
+ previousValue: any;
190
+ }
191
+
192
+ // @public
193
+ export class LocalValueMaker {
194
+ constructor(serializer: IFluidSerializer);
195
+ fromInMemory(value: unknown): ILocalValue;
196
+ fromSerializable(serializable: ISerializableValue): ILocalValue;
197
+ }
198
+
199
+ // @public @sealed
200
+ export class MapFactory implements IChannelFactory {
201
+ // (undocumented)
202
+ static readonly Attributes: IChannelAttributes;
203
+ // (undocumented)
204
+ get attributes(): IChannelAttributes;
205
+ // (undocumented)
206
+ create(runtime: IFluidDataStoreRuntime, id: string): ISharedMap;
207
+ // (undocumented)
208
+ load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedMap>;
209
+ // (undocumented)
210
+ static readonly Type = "https://graph.microsoft.com/types/map";
211
+ // (undocumented)
212
+ get type(): string;
213
+ }
214
+
215
+ // @public @sealed
216
+ export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implements ISharedDirectory {
217
+ [Symbol.iterator](): IterableIterator<[string, any]>;
218
+ [Symbol.toStringTag]: string;
219
+ constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
220
+ get absolutePath(): string;
221
+ // @internal (undocumented)
222
+ protected applyStashedOp(op: unknown): unknown;
223
+ clear(): void;
224
+ countSubDirectory(): number;
225
+ static create(runtime: IFluidDataStoreRuntime, id?: string): SharedDirectory;
226
+ createSubDirectory(subdirName: string): IDirectory;
227
+ delete(key: string): boolean;
228
+ deleteSubDirectory(subdirName: string): boolean;
229
+ // (undocumented)
230
+ dispose(error?: Error): void;
231
+ // (undocumented)
232
+ get disposed(): boolean;
233
+ entries(): IterableIterator<[string, any]>;
234
+ forEach(callback: (value: any, key: string, map: Map<string, any>) => void): void;
235
+ get<T = any>(key: string): T | undefined;
236
+ static getFactory(): IChannelFactory;
237
+ getSubDirectory(subdirName: string): IDirectory | undefined;
238
+ getWorkingDirectory(relativePath: string): IDirectory | undefined;
239
+ has(key: string): boolean;
240
+ hasSubDirectory(subdirName: string): boolean;
241
+ keys(): IterableIterator<string>;
242
+ // @internal (undocumented)
243
+ protected loadCore(storage: IChannelStorageService): Promise<void>;
244
+ // @internal (undocumented)
245
+ readonly localValueMaker: LocalValueMaker;
246
+ // @internal (undocumented)
247
+ protected onDisconnect(): void;
248
+ // @internal
249
+ protected populate(data: IDirectoryDataObject): void;
250
+ // @internal (undocumented)
251
+ protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
252
+ // @internal (undocumented)
253
+ protected reSubmitCore(content: unknown, localOpMetadata: unknown): void;
254
+ // @internal (undocumented)
255
+ protected rollback(content: unknown, localOpMetadata: unknown): void;
256
+ set<T = unknown>(key: string, value: T): this;
257
+ get size(): number;
258
+ subdirectories(): IterableIterator<[string, IDirectory]>;
259
+ // @internal
260
+ submitDirectoryMessage(op: IDirectoryOperation, localOpMetadata: unknown): void;
261
+ // @internal (undocumented)
262
+ protected summarizeCore(serializer: IFluidSerializer, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
263
+ values(): IterableIterator<any>;
264
+ }
265
+
266
+ // @public
267
+ export class SharedMap extends SharedObject<ISharedMapEvents> implements ISharedMap {
268
+ [Symbol.iterator](): IterableIterator<[string, any]>;
269
+ readonly [Symbol.toStringTag]: string;
270
+ constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
271
+ // @internal (undocumented)
272
+ protected applyStashedOp(content: unknown): unknown;
273
+ clear(): void;
274
+ static create(runtime: IFluidDataStoreRuntime, id?: string): SharedMap;
275
+ delete(key: string): boolean;
276
+ entries(): IterableIterator<[string, any]>;
277
+ forEach(callbackFn: (value: any, key: string, map: Map<string, any>) => void): void;
278
+ get<T = any>(key: string): T | undefined;
279
+ static getFactory(): IChannelFactory;
280
+ has(key: string): boolean;
281
+ keys(): IterableIterator<string>;
282
+ // @internal (undocumented)
283
+ protected loadCore(storage: IChannelStorageService): Promise<void>;
284
+ // @internal (undocumented)
285
+ protected onDisconnect(): void;
286
+ // @internal (undocumented)
287
+ protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
288
+ // @internal (undocumented)
289
+ protected reSubmitCore(content: unknown, localOpMetadata: unknown): void;
290
+ // @internal (undocumented)
291
+ protected rollback(content: unknown, localOpMetadata: unknown): void;
292
+ set(key: string, value: unknown): this;
293
+ get size(): number;
294
+ // @internal (undocumented)
295
+ protected summarizeCore(serializer: IFluidSerializer, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
296
+ values(): IterableIterator<any>;
297
+ }
298
+
299
+ ```
@@ -10,6 +10,8 @@ import { IDirectory, ISerializableValue, ISharedDirectory, ISharedDirectoryEvent
10
10
  import { LocalValueMaker } from "./localValues";
11
11
  /**
12
12
  * Operation indicating a value should be set for a key.
13
+ *
14
+ * @public
13
15
  */
14
16
  export interface IDirectorySetOperation {
15
17
  /**
@@ -31,6 +33,8 @@ export interface IDirectorySetOperation {
31
33
  }
32
34
  /**
33
35
  * Operation indicating a key should be deleted from the directory.
36
+ *
37
+ * @public
34
38
  */
35
39
  export interface IDirectoryDeleteOperation {
36
40
  /**
@@ -47,11 +51,15 @@ export interface IDirectoryDeleteOperation {
47
51
  path: string;
48
52
  }
49
53
  /**
50
- * An operation on a specific key within a directory
54
+ * An operation on a specific key within a directory.
55
+ *
56
+ * @public
51
57
  */
52
58
  export type IDirectoryKeyOperation = IDirectorySetOperation | IDirectoryDeleteOperation;
53
59
  /**
54
60
  * Operation indicating the directory should be cleared.
61
+ *
62
+ * @public
55
63
  */
56
64
  export interface IDirectoryClearOperation {
57
65
  /**
@@ -64,11 +72,15 @@ export interface IDirectoryClearOperation {
64
72
  path: string;
65
73
  }
66
74
  /**
67
- * An operation on one or more of the keys within a directory
75
+ * An operation on one or more of the keys within a directory.
76
+ *
77
+ * @public
68
78
  */
69
79
  export type IDirectoryStorageOperation = IDirectoryKeyOperation | IDirectoryClearOperation;
70
80
  /**
71
81
  * Operation indicating a subdirectory should be created.
82
+ *
83
+ * @public
72
84
  */
73
85
  export interface IDirectoryCreateSubDirectoryOperation {
74
86
  /**
@@ -86,6 +98,8 @@ export interface IDirectoryCreateSubDirectoryOperation {
86
98
  }
87
99
  /**
88
100
  * Operation indicating a subdirectory should be deleted.
101
+ *
102
+ * @public
89
103
  */
90
104
  export interface IDirectoryDeleteSubDirectoryOperation {
91
105
  /**
@@ -102,15 +116,21 @@ export interface IDirectoryDeleteSubDirectoryOperation {
102
116
  subdirName: string;
103
117
  }
104
118
  /**
105
- * An operation on the subdirectories within a directory
119
+ * An operation on the subdirectories within a directory.
120
+ *
121
+ * @public
106
122
  */
107
123
  export type IDirectorySubDirectoryOperation = IDirectoryCreateSubDirectoryOperation | IDirectoryDeleteSubDirectoryOperation;
108
124
  /**
109
- * Any operation on a directory
125
+ * Any operation on a directory.
126
+ *
127
+ * @public
110
128
  */
111
129
  export type IDirectoryOperation = IDirectoryStorageOperation | IDirectorySubDirectoryOperation;
112
130
  /**
113
131
  * Create info for the subdirectory.
132
+ *
133
+ * @public
114
134
  */
115
135
  export interface ICreateInfo {
116
136
  /**
@@ -129,6 +149,8 @@ export interface ICreateInfo {
129
149
  * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
130
150
  * | JSON.stringify}, direct result from
131
151
  * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse | JSON.parse}.
152
+ *
153
+ * @public
132
154
  */
133
155
  export interface IDirectoryDataObject {
134
156
  /**
@@ -171,6 +193,7 @@ export interface IDirectoryNewStorageFormat {
171
193
  * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedDirectory}.
172
194
  *
173
195
  * @sealed
196
+ * @public
174
197
  */
175
198
  export declare class DirectoryFactory implements IChannelFactory {
176
199
  /**
@@ -210,6 +233,7 @@ export declare class DirectoryFactory implements IChannelFactory {
210
233
  * ```
211
234
  *
212
235
  * @sealed
236
+ * @public
213
237
  */
214
238
  export declare class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implements ISharedDirectory {
215
239
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../src/directory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,yBAAyB,EAAe,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,q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,CAAC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAQpE;;;OAGG;IACH,OAAO,CAAC,YAAY;IAIpB;;;;;;;;;OASG;IACH,OAAO,CAAC,SAAS;IAcjB;;;;OAIG;IACH,OAAO,CAAC,2BAA2B;IAsBnC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAsJ1B;;;OAGG;IACH,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO;IAQ9C,OAAO,CAAC,kBAAkB;CAkE1B"}
package/dist/directory.js CHANGED
@@ -47,6 +47,7 @@ const snapshotFileName = "header";
47
47
  * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedDirectory}.
48
48
  *
49
49
  * @sealed
50
+ * @public
50
51
  */
51
52
  class DirectoryFactory {
52
53
  /**
@@ -103,6 +104,7 @@ DirectoryFactory.Attributes = {
103
104
  * ```
104
105
  *
105
106
  * @sealed
107
+ * @public
106
108
  */
107
109
  class SharedDirectory extends shared_object_base_1.SharedObject {
108
110
  /**
@@ -1278,9 +1280,12 @@ class SubDirectory extends client_utils_1.TypedEventEmitter {
1278
1280
  const pendingMessageIds = this.pendingKeys.get(op.key);
1279
1281
  // Only submit the op, if we have record for it, otherwise it is possible that the older instance
1280
1282
  // is already deleted, in which case we don't need to submit the op.
1281
- if (pendingMessageIds !== undefined &&
1282
- pendingMessageIds[0] === localOpMetadata.pendingMessageId) {
1283
- pendingMessageIds.shift();
1283
+ if (pendingMessageIds !== undefined) {
1284
+ const index = pendingMessageIds.findIndex((id) => id === localOpMetadata.pendingMessageId);
1285
+ if (index === -1) {
1286
+ return;
1287
+ }
1288
+ pendingMessageIds.splice(index, 1);
1284
1289
  if (pendingMessageIds.length === 0) {
1285
1290
  this.pendingKeys.delete(op.key);
1286
1291
  }
@@ -1522,17 +1527,15 @@ class SubDirectory extends client_utils_1.TypedEventEmitter {
1522
1527
  // If I have a NACK clear, we can ignore all ops.
1523
1528
  return false;
1524
1529
  }
1525
- const pendingKeyMessageId = this.pendingKeys.get(op.key);
1526
- if (pendingKeyMessageId !== undefined) {
1530
+ const pendingKeyMessageIds = this.pendingKeys.get(op.key);
1531
+ if (pendingKeyMessageIds !== undefined) {
1527
1532
  // Found an NACK op, clear it from the directory if the latest sequence number in the directory
1528
1533
  // match the message's and don't process the op.
1529
1534
  if (local) {
1530
1535
  (0, core_utils_1.assert)(localOpMetadata !== undefined && isKeyEditLocalOpMetadata(localOpMetadata), 0x011 /* pendingMessageId is missing from the local client's operation */);
1531
- const pendingMessageIds = this.pendingKeys.get(op.key);
1532
- (0, core_utils_1.assert)(pendingMessageIds !== undefined &&
1533
- pendingMessageIds[0] === localOpMetadata.pendingMessageId, 0x331 /* Unexpected pending message received */);
1534
- pendingMessageIds.shift();
1535
- if (pendingMessageIds.length === 0) {
1536
+ (0, core_utils_1.assert)(pendingKeyMessageIds[0] === localOpMetadata.pendingMessageId, 0x331 /* Unexpected pending message received */);
1537
+ pendingKeyMessageIds.shift();
1538
+ if (pendingKeyMessageIds.length === 0) {
1536
1539
  this.pendingKeys.delete(op.key);
1537
1540
  }
1538
1541
  }