@fluidframework/ordered-collection 2.0.0-rc.2.0.2 → 2.0.0-rc.3.0.1

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 (65) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/api-report/ordered-collection.api.md +1 -1
  3. package/dist/consensusOrderedCollection.d.ts +4 -3
  4. package/dist/consensusOrderedCollection.d.ts.map +1 -1
  5. package/dist/consensusOrderedCollection.js +11 -11
  6. package/dist/consensusOrderedCollection.js.map +1 -1
  7. package/dist/consensusOrderedCollectionFactory.d.ts +1 -1
  8. package/dist/consensusOrderedCollectionFactory.d.ts.map +1 -1
  9. package/dist/consensusOrderedCollectionFactory.js.map +1 -1
  10. package/dist/consensusQueue.d.ts +1 -1
  11. package/dist/consensusQueue.d.ts.map +1 -1
  12. package/dist/consensusQueue.js.map +1 -1
  13. package/dist/interfaces.d.ts +1 -1
  14. package/dist/interfaces.d.ts.map +1 -1
  15. package/dist/interfaces.js.map +1 -1
  16. package/dist/legacy.d.ts +21 -0
  17. package/dist/packageVersion.d.ts +1 -1
  18. package/dist/packageVersion.js +1 -1
  19. package/dist/packageVersion.js.map +1 -1
  20. package/dist/public.d.ts +12 -0
  21. package/dist/snapshotableArray.js +2 -2
  22. package/dist/snapshotableArray.js.map +1 -1
  23. package/internal.d.ts +11 -0
  24. package/legacy.d.ts +11 -0
  25. package/lib/consensusOrderedCollection.d.ts +4 -3
  26. package/lib/consensusOrderedCollection.d.ts.map +1 -1
  27. package/lib/consensusOrderedCollection.js +3 -3
  28. package/lib/consensusOrderedCollection.js.map +1 -1
  29. package/lib/consensusOrderedCollectionFactory.d.ts +1 -1
  30. package/lib/consensusOrderedCollectionFactory.d.ts.map +1 -1
  31. package/lib/consensusOrderedCollectionFactory.js.map +1 -1
  32. package/lib/consensusQueue.d.ts +1 -1
  33. package/lib/consensusQueue.d.ts.map +1 -1
  34. package/lib/consensusQueue.js.map +1 -1
  35. package/lib/interfaces.d.ts +1 -1
  36. package/lib/interfaces.d.ts.map +1 -1
  37. package/lib/interfaces.js.map +1 -1
  38. package/lib/legacy.d.ts +21 -0
  39. package/lib/packageVersion.d.ts +1 -1
  40. package/lib/packageVersion.js +1 -1
  41. package/lib/packageVersion.js.map +1 -1
  42. package/lib/public.d.ts +12 -0
  43. package/lib/snapshotableArray.js +1 -1
  44. package/lib/snapshotableArray.js.map +1 -1
  45. package/package.json +35 -56
  46. package/src/consensusOrderedCollection.ts +8 -6
  47. package/src/consensusOrderedCollectionFactory.ts +2 -1
  48. package/src/consensusQueue.ts +2 -1
  49. package/src/interfaces.ts +2 -2
  50. package/src/packageVersion.ts +1 -1
  51. package/src/snapshotableArray.ts +1 -1
  52. package/api-extractor-cjs.json +0 -8
  53. package/dist/ordered-collection-alpha.d.ts +0 -228
  54. package/dist/ordered-collection-beta.d.ts +0 -39
  55. package/dist/ordered-collection-public.d.ts +0 -39
  56. package/dist/ordered-collection-untrimmed.d.ts +0 -263
  57. package/lib/ordered-collection-alpha.d.ts +0 -228
  58. package/lib/ordered-collection-beta.d.ts +0 -39
  59. package/lib/ordered-collection-public.d.ts +0 -39
  60. package/lib/ordered-collection-untrimmed.d.ts +0 -263
  61. package/lib/test/consensusOrderedCollection.spec.js +0 -314
  62. package/lib/test/consensusOrderedCollection.spec.js.map +0 -1
  63. package/lib/test/types/validateOrderedCollectionPrevious.generated.js +0 -24
  64. package/lib/test/types/validateOrderedCollectionPrevious.generated.js.map +0 -1
  65. /package/{dist → lib}/tsdoc-metadata.json +0 -0
@@ -1,314 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import { strict as assert } from "assert";
6
- import { runGCTests } from "@fluid-private/test-dds-utils";
7
- import { MockContainerRuntimeFactory, MockContainerRuntimeFactoryForReconnection, MockFluidDataStoreRuntime, MockStorage, } from "@fluidframework/test-runtime-utils";
8
- import { ConsensusQueueFactory } from "../consensusOrderedCollectionFactory.js";
9
- import { ConsensusResult } from "../interfaces.js";
10
- import { acquireAndComplete, waitAcquireAndComplete } from "../testUtils.js";
11
- function createConnectedCollection(id, runtimeFactory) {
12
- const dataStoreRuntime = new MockFluidDataStoreRuntime();
13
- runtimeFactory.createContainerRuntime(dataStoreRuntime);
14
- const services = {
15
- deltaConnection: dataStoreRuntime.createDeltaConnection(),
16
- objectStorage: new MockStorage(),
17
- };
18
- const factory = new ConsensusQueueFactory();
19
- const testCollection = factory.create(dataStoreRuntime, id);
20
- testCollection.connect(services);
21
- return testCollection;
22
- }
23
- function createLocalCollection(id) {
24
- const factory = new ConsensusQueueFactory();
25
- return factory.create(new MockFluidDataStoreRuntime(), id);
26
- }
27
- function createCollectionForReconnection(id, runtimeFactory) {
28
- const dataStoreRuntime = new MockFluidDataStoreRuntime();
29
- const containerRuntime = runtimeFactory.createContainerRuntime(dataStoreRuntime);
30
- const services = {
31
- deltaConnection: dataStoreRuntime.createDeltaConnection(),
32
- objectStorage: new MockStorage(),
33
- };
34
- const factory = new ConsensusQueueFactory();
35
- const collection = factory.create(dataStoreRuntime, id);
36
- collection.connect(services);
37
- return { collection, containerRuntime };
38
- }
39
- describe("ConsensusOrderedCollection", () => {
40
- function generate(input, output, creator, processMessages) {
41
- let testCollection;
42
- async function removeItem() {
43
- const resP = acquireAndComplete(testCollection);
44
- processMessages();
45
- setImmediate(() => processMessages());
46
- return resP;
47
- }
48
- async function waitAndRemoveItem() {
49
- processMessages();
50
- const resP = waitAcquireAndComplete(testCollection);
51
- processMessages();
52
- setImmediate(() => processMessages());
53
- return resP;
54
- }
55
- async function addItem(item) {
56
- const waitP = testCollection.add(item);
57
- processMessages();
58
- return waitP;
59
- }
60
- describe("ConsensusQueue", () => {
61
- beforeEach(async () => {
62
- testCollection = creator();
63
- });
64
- it("Can create a collection", () => {
65
- assert.ok(testCollection);
66
- });
67
- it("Can add and remove data", async () => {
68
- assert.strictEqual(await removeItem(), undefined);
69
- await addItem("testValue");
70
- assert.strictEqual(await removeItem(), "testValue");
71
- assert.strictEqual(await removeItem(), undefined);
72
- });
73
- it("Can add and remove a handle", async () => {
74
- assert.strictEqual(await removeItem(), undefined);
75
- const handle = testCollection.handle;
76
- assert(handle, "Need an actual handle to test this case");
77
- await addItem(handle);
78
- const acquiredValue = await removeItem();
79
- assert.strictEqual(acquiredValue.absolutePath, handle.absolutePath);
80
- const dataStore = await handle.get();
81
- assert.strictEqual(dataStore.handle.absolutePath, testCollection.handle.absolutePath);
82
- assert.strictEqual(await removeItem(), undefined);
83
- });
84
- it("Can add and release data", async () => {
85
- await addItem("testValue");
86
- const promise = testCollection.acquire(async (value) => {
87
- assert.strictEqual(value, "testValue");
88
- return ConsensusResult.Release;
89
- });
90
- processMessages();
91
- await promise;
92
- assert.strictEqual(await waitAndRemoveItem(), "testValue");
93
- assert.strictEqual(await removeItem(), undefined);
94
- });
95
- it("Can wait for data", async () => {
96
- let added = false;
97
- let res;
98
- const p = testCollection.waitAndAcquire(async (value) => {
99
- assert(added, "Wait resolved before value is added");
100
- res = value;
101
- return ConsensusResult.Complete;
102
- });
103
- const p2 = addItem("testValue");
104
- processMessages();
105
- added = true;
106
- await p2;
107
- // There are two hops here - one "acquire" message, another "release" message.
108
- processMessages();
109
- setImmediate(() => processMessages());
110
- await p;
111
- assert.strictEqual(res, "testValue");
112
- });
113
- it("Data ordering", async () => {
114
- for (const item of input) {
115
- await addItem(item);
116
- }
117
- for (const item of output) {
118
- assert.strictEqual(await removeItem(), item);
119
- }
120
- assert.strictEqual(await removeItem(), undefined, "Remove from empty collection should undefined");
121
- });
122
- it("Event", async () => {
123
- let addCount = 0;
124
- let removeCount = 0;
125
- const addListener = (value) => {
126
- assert.strictEqual(value, input[addCount], "Added event value not matched");
127
- addCount += 1;
128
- };
129
- testCollection.on("add", addListener);
130
- const acquireListener = (value) => {
131
- assert.strictEqual(value, output[removeCount], "Remove event value not matched");
132
- removeCount += 1;
133
- };
134
- testCollection.on("acquire", acquireListener);
135
- for (const item of input) {
136
- await addItem(item);
137
- }
138
- processMessages();
139
- let count = output.length;
140
- while (count > 0) {
141
- await removeItem();
142
- count -= 1;
143
- }
144
- assert.strictEqual(await removeItem(), undefined, "Remove from empty collection should undefined");
145
- assert.strictEqual(addCount, input.length, "Incorrect number add event");
146
- assert.strictEqual(removeCount, output.length, "Incorrect number remove event");
147
- testCollection.off("add", addListener);
148
- testCollection.off("acquire", acquireListener);
149
- });
150
- it("can clone object value", async () => {
151
- const obj = { x: 1 };
152
- await addItem(obj);
153
- const result = await removeItem();
154
- assert.notStrictEqual(result, obj);
155
- assert.strictEqual(result.x, 1);
156
- });
157
- });
158
- }
159
- describe("Detached", () => {
160
- generate([1, 2], [1, 2], () => createLocalCollection("consensus-ordered-collection"), () => { });
161
- });
162
- describe("Attached, connected", () => {
163
- const containerRuntimeFactory = new MockContainerRuntimeFactory();
164
- let counter = 0;
165
- generate([1, 2], [1, 2], () => createConnectedCollection(`consensus-ordered-collection_${++counter}`, containerRuntimeFactory), () => {
166
- containerRuntimeFactory.processAllMessages();
167
- });
168
- });
169
- describe("Reconnection flow", () => {
170
- let containerRuntimeFactory;
171
- let containerRuntime1;
172
- let testCollection1;
173
- let testCollection2;
174
- beforeEach(async () => {
175
- containerRuntimeFactory = new MockContainerRuntimeFactoryForReconnection();
176
- // Create first ConsensusOrderedCollection
177
- const response1 = createCollectionForReconnection("collection1", containerRuntimeFactory);
178
- testCollection1 = response1.collection;
179
- containerRuntime1 = response1.containerRuntime;
180
- // Create second ConsensusOrderedCollection
181
- const response2 = createCollectionForReconnection("collection2", containerRuntimeFactory);
182
- testCollection2 = response2.collection;
183
- });
184
- it("can resend unacked ops on reconnection", async () => {
185
- /**
186
- * First, we will add a value to the first collection and verify the op is resent.
187
- */
188
- const testValue = "testValue";
189
- // Add a listener to the second collection. This is used to verify that the added value reaches the remote
190
- // client.
191
- let addedValue = "";
192
- let newlyAdded = false;
193
- testCollection2.on("add", (value, added) => {
194
- addedValue = value;
195
- newlyAdded = added;
196
- });
197
- // Add a value to the first ConsensusOrderedCollection
198
- const waitP = testCollection1.add(testValue);
199
- // Disconnect and reconnect the first collection.
200
- containerRuntime1.connected = false;
201
- containerRuntime1.connected = true;
202
- // Process the messages.
203
- containerRuntimeFactory.processAllMessages();
204
- await waitP;
205
- // Verify that the remote collection received the added value.
206
- assert.equal(addedValue, testValue, "The remote client did not receive the added value");
207
- assert.equal(newlyAdded, true, "The remote client's value was not newly added");
208
- /**
209
- * Now, we will acquire the added value in the first collection and verify the op is resent.
210
- */
211
- // Add a listener to the second collection. This is used to verify that the acquired op reaches the remote
212
- // client.
213
- let acquiredValue = "";
214
- let acquiredClientId = "";
215
- testCollection2.on("acquire", (value, clientId) => {
216
- acquiredValue = value;
217
- acquiredClientId = clientId;
218
- });
219
- // Acquire the previously added value.
220
- let res;
221
- const resultP = testCollection1.acquire(async (value) => {
222
- res = value;
223
- return ConsensusResult.Complete;
224
- });
225
- // Disconnect and reconnect the first collection.
226
- containerRuntime1.connected = false;
227
- containerRuntime1.connected = true;
228
- // Process the messages.
229
- containerRuntimeFactory.processAllMessages();
230
- setImmediate(() => containerRuntimeFactory.processAllMessages());
231
- await resultP;
232
- // Verify that the value acquired is the one that was added earlier.
233
- assert.equal(res, testValue, "The acquired value does not match the added value");
234
- // Verify that the remote collection received the acquired op.
235
- assert.equal(acquiredValue, testValue, "The remote client did not receive the acquired value");
236
- assert.equal(acquiredClientId, containerRuntime1.clientId, "The remote client did not get the correct id of client that acquired the value");
237
- });
238
- it("can store ops in disconnected state and resend them on reconnection", async () => {
239
- const testValue = "testValue";
240
- // Add a listener to the second collection. This is used to verify that the added value reaches the
241
- // remote client.
242
- let addedValue = "";
243
- let newlyAdded = false;
244
- testCollection2.on("add", (value, added) => {
245
- addedValue = value;
246
- newlyAdded = added;
247
- });
248
- // Disconnect the first collection
249
- containerRuntime1.connected = false;
250
- // Add a value to the first ConsensusOrderedCollection.
251
- const waitP = testCollection1.add(testValue);
252
- // Reconnect the first collection.
253
- containerRuntime1.connected = true;
254
- // Process the messages.
255
- containerRuntimeFactory.processAllMessages();
256
- await waitP;
257
- // Verify that the remote collection received the added value.
258
- assert.equal(addedValue, testValue, "The remote client did not receive the added value");
259
- assert.equal(newlyAdded, true, "The remote client's value was not newly added");
260
- });
261
- });
262
- describe("Garbage Collection", () => {
263
- class GCOrderedCollectionProvider {
264
- constructor() {
265
- this._expectedRoutes = [];
266
- this.subCollectionCount = 0;
267
- this.containerRuntimeFactory = new MockContainerRuntimeFactory();
268
- this.collection = createConnectedCollection("ordered-collection", this.containerRuntimeFactory);
269
- }
270
- async addItem(item) {
271
- const waitP = this.collection.add(item);
272
- this.containerRuntimeFactory.processAllMessages();
273
- return waitP;
274
- }
275
- async removeItem() {
276
- const resP = acquireAndComplete(this.collection);
277
- this.containerRuntimeFactory.processAllMessages();
278
- setImmediate(() => this.containerRuntimeFactory.processAllMessages());
279
- return resP;
280
- }
281
- get sharedObject() {
282
- return this.collection;
283
- }
284
- get expectedOutboundRoutes() {
285
- return this._expectedRoutes;
286
- }
287
- async addOutboundRoutes() {
288
- const subCollection = createLocalCollection(`subCollection-${++this.subCollectionCount}`);
289
- await this.addItem(subCollection.handle);
290
- this._expectedRoutes.push(subCollection.handle.absolutePath);
291
- }
292
- async deleteOutboundRoutes() {
293
- const deletedHandle = (await this.removeItem());
294
- assert(deletedHandle, "Route must be added before deleting");
295
- // Remove deleted handle's route from expected routes.
296
- this._expectedRoutes = this._expectedRoutes.filter((route) => route !== deletedHandle.absolutePath);
297
- }
298
- async addNestedHandles() {
299
- const subCollection1 = createLocalCollection(`subCollection-${++this.subCollectionCount}`);
300
- const subCollection2 = createLocalCollection(`subCollection-${++this.subCollectionCount}`);
301
- const containingObject = {
302
- collection1Handle: subCollection1.handle,
303
- nestedObj: {
304
- collection2Handle: subCollection2.handle,
305
- },
306
- };
307
- await this.addItem(containingObject);
308
- this._expectedRoutes.push(subCollection1.handle.absolutePath, subCollection2.handle.absolutePath);
309
- }
310
- }
311
- runGCTests(GCOrderedCollectionProvider);
312
- });
313
- });
314
- //# sourceMappingURL=consensusOrderedCollection.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"consensusOrderedCollection.spec.js","sourceRoot":"","sources":["../../src/test/consensusOrderedCollection.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,EAAmB,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EACN,2BAA2B,EAC3B,0CAA0C,EAE1C,yBAAyB,EACzB,WAAW,GACX,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,eAAe,EAA+B,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE7E,SAAS,yBAAyB,CAAC,EAAU,EAAE,cAA2C;IACzF,MAAM,gBAAgB,GAAG,IAAI,yBAAyB,EAAE,CAAC;IACzD,cAAc,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAqB;QAClC,eAAe,EAAE,gBAAgB,CAAC,qBAAqB,EAAE;QACzD,aAAa,EAAE,IAAI,WAAW,EAAE;KAChC,CAAC;IAEF,MAAM,OAAO,GAAG,IAAI,qBAAqB,EAAE,CAAC;IAC5C,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;IAC5D,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,OAAO,cAAc,CAAC;AACvB,CAAC;AAED,SAAS,qBAAqB,CAAC,EAAU;IACxC,MAAM,OAAO,GAAG,IAAI,qBAAqB,EAAE,CAAC;IAC5C,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,yBAAyB,EAAE,EAAE,EAA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,CAAiB,CAAC;gBAChE,MAAM,CAAC,aAAa,EAAE,qCAAqC,CAAC,CAAC;gBAC7D,sDAAsD;gBACtD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CACjD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,aAAa,CAAC,YAAY,CAC/C,CAAC;YACH,CAAC;YAEM,KAAK,CAAC,gBAAgB;gBAC5B,MAAM,cAAc,GAAG,qBAAqB,CAC3C,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAC5C,CAAC;gBACF,MAAM,cAAc,GAAG,qBAAqB,CAC3C,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAC5C,CAAC;gBACF,MAAM,gBAAgB,GAAG;oBACxB,iBAAiB,EAAE,cAAc,CAAC,MAAM;oBACxC,SAAS,EAAE;wBACV,iBAAiB,EAAE,cAAc,CAAC,MAAM;qBACxC;iBACD,CAAC;gBACF,MAAM,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;gBACrC,IAAI,CAAC,eAAe,CAAC,IAAI,CACxB,cAAc,CAAC,MAAM,CAAC,YAAY,EAClC,cAAc,CAAC,MAAM,CAAC,YAAY,CAClC,CAAC;YACH,CAAC;SACD;QAED,UAAU,CAAC,2BAA2B,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from \"assert\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { IChannelServices } from \"@fluidframework/datastore-definitions\";\nimport { IGCTestProvider, runGCTests } from \"@fluid-private/test-dds-utils\";\nimport {\n\tMockContainerRuntimeFactory,\n\tMockContainerRuntimeFactoryForReconnection,\n\tMockContainerRuntimeForReconnection,\n\tMockFluidDataStoreRuntime,\n\tMockStorage,\n} from \"@fluidframework/test-runtime-utils\";\nimport { ConsensusQueueFactory } from \"../consensusOrderedCollectionFactory.js\";\nimport { ConsensusResult, IConsensusOrderedCollection } from \"../interfaces.js\";\nimport { acquireAndComplete, waitAcquireAndComplete } from \"../testUtils.js\";\n\nfunction createConnectedCollection(id: string, runtimeFactory: MockContainerRuntimeFactory) {\n\tconst dataStoreRuntime = new MockFluidDataStoreRuntime();\n\truntimeFactory.createContainerRuntime(dataStoreRuntime);\n\tconst services: IChannelServices = {\n\t\tdeltaConnection: dataStoreRuntime.createDeltaConnection(),\n\t\tobjectStorage: new MockStorage(),\n\t};\n\n\tconst factory = new ConsensusQueueFactory();\n\tconst testCollection = factory.create(dataStoreRuntime, id);\n\ttestCollection.connect(services);\n\treturn testCollection;\n}\n\nfunction createLocalCollection(id: string) {\n\tconst factory = new ConsensusQueueFactory();\n\treturn factory.create(new MockFluidDataStoreRuntime(), id);\n}\n\nfunction createCollectionForReconnection(\n\tid: string,\n\truntimeFactory: MockContainerRuntimeFactoryForReconnection,\n) {\n\tconst dataStoreRuntime = new MockFluidDataStoreRuntime();\n\tconst containerRuntime = runtimeFactory.createContainerRuntime(dataStoreRuntime);\n\tconst services: IChannelServices = {\n\t\tdeltaConnection: dataStoreRuntime.createDeltaConnection(),\n\t\tobjectStorage: new MockStorage(),\n\t};\n\n\tconst factory = new ConsensusQueueFactory();\n\tconst collection = factory.create(dataStoreRuntime, id);\n\tcollection.connect(services);\n\treturn { collection, containerRuntime };\n}\n\ndescribe(\"ConsensusOrderedCollection\", () => {\n\tfunction generate(\n\t\tinput: any[],\n\t\toutput: any[],\n\t\tcreator: () => IConsensusOrderedCollection,\n\t\tprocessMessages: () => void,\n\t) {\n\t\tlet testCollection: IConsensusOrderedCollection;\n\n\t\tasync function removeItem() {\n\t\t\tconst resP = acquireAndComplete(testCollection);\n\t\t\tprocessMessages();\n\t\t\tsetImmediate(() => processMessages());\n\t\t\treturn resP;\n\t\t}\n\n\t\tasync function waitAndRemoveItem() {\n\t\t\tprocessMessages();\n\t\t\tconst resP = waitAcquireAndComplete(testCollection);\n\t\t\tprocessMessages();\n\t\t\tsetImmediate(() => processMessages());\n\t\t\treturn resP;\n\t\t}\n\n\t\tasync function addItem(item) {\n\t\t\tconst waitP = testCollection.add(item);\n\t\t\tprocessMessages();\n\t\t\treturn waitP;\n\t\t}\n\n\t\tdescribe(\"ConsensusQueue\", () => {\n\t\t\tbeforeEach(async () => {\n\t\t\t\ttestCollection = creator();\n\t\t\t});\n\n\t\t\tit(\"Can create a collection\", () => {\n\t\t\t\tassert.ok(testCollection);\n\t\t\t});\n\n\t\t\tit(\"Can add and remove data\", async () => {\n\t\t\t\tassert.strictEqual(await removeItem(), undefined);\n\t\t\t\tawait addItem(\"testValue\");\n\t\t\t\tassert.strictEqual(await removeItem(), \"testValue\");\n\t\t\t\tassert.strictEqual(await removeItem(), undefined);\n\t\t\t});\n\n\t\t\tit(\"Can add and remove a handle\", async () => {\n\t\t\t\tassert.strictEqual(await removeItem(), undefined);\n\t\t\t\tconst handle = testCollection.handle;\n\t\t\t\tassert(handle, \"Need an actual handle to test this case\");\n\t\t\t\tawait addItem(handle);\n\n\t\t\t\tconst acquiredValue = await removeItem();\n\t\t\t\tassert.strictEqual(acquiredValue.absolutePath, handle.absolutePath);\n\t\t\t\tconst dataStore = await handle.get();\n\t\t\t\tassert.strictEqual(\n\t\t\t\t\tdataStore.handle.absolutePath,\n\t\t\t\t\ttestCollection.handle.absolutePath,\n\t\t\t\t);\n\n\t\t\t\tassert.strictEqual(await removeItem(), undefined);\n\t\t\t});\n\n\t\t\tit(\"Can add and release data\", async () => {\n\t\t\t\tawait addItem(\"testValue\");\n\t\t\t\tconst promise = testCollection.acquire(async (value) => {\n\t\t\t\t\tassert.strictEqual(value, \"testValue\");\n\t\t\t\t\treturn ConsensusResult.Release;\n\t\t\t\t});\n\t\t\t\tprocessMessages();\n\t\t\t\tawait promise;\n\t\t\t\tassert.strictEqual(await waitAndRemoveItem(), \"testValue\");\n\t\t\t\tassert.strictEqual(await removeItem(), undefined);\n\t\t\t});\n\n\t\t\tit(\"Can wait for data\", async () => {\n\t\t\t\tlet added = false;\n\t\t\t\tlet res: any;\n\t\t\t\tconst p = testCollection.waitAndAcquire(async (value) => {\n\t\t\t\t\tassert(added, \"Wait resolved before value is added\");\n\t\t\t\t\tres = value;\n\t\t\t\t\treturn ConsensusResult.Complete;\n\t\t\t\t});\n\n\t\t\t\tconst p2 = addItem(\"testValue\");\n\t\t\t\tprocessMessages();\n\t\t\t\tadded = true;\n\t\t\t\tawait p2;\n\t\t\t\t// There are two hops here - one \"acquire\" message, another \"release\" message.\n\t\t\t\tprocessMessages();\n\t\t\t\tsetImmediate(() => processMessages());\n\t\t\t\tawait p;\n\t\t\t\tassert.strictEqual(res, \"testValue\");\n\t\t\t});\n\n\t\t\tit(\"Data ordering\", async () => {\n\t\t\t\tfor (const item of input) {\n\t\t\t\t\tawait addItem(item);\n\t\t\t\t}\n\n\t\t\t\tfor (const item of output) {\n\t\t\t\t\tassert.strictEqual(await removeItem(), item);\n\t\t\t\t}\n\t\t\t\tassert.strictEqual(\n\t\t\t\t\tawait removeItem(),\n\t\t\t\t\tundefined,\n\t\t\t\t\t\"Remove from empty collection should undefined\",\n\t\t\t\t);\n\t\t\t});\n\n\t\t\tit(\"Event\", async () => {\n\t\t\t\tlet addCount = 0;\n\t\t\t\tlet removeCount = 0;\n\t\t\t\tconst addListener = (value) => {\n\t\t\t\t\tassert.strictEqual(value, input[addCount], \"Added event value not matched\");\n\t\t\t\t\taddCount += 1;\n\t\t\t\t};\n\t\t\t\ttestCollection.on(\"add\", addListener);\n\n\t\t\t\tconst acquireListener = (value) => {\n\t\t\t\t\tassert.strictEqual(\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\toutput[removeCount],\n\t\t\t\t\t\t\"Remove event value not matched\",\n\t\t\t\t\t);\n\t\t\t\t\tremoveCount += 1;\n\t\t\t\t};\n\t\t\t\ttestCollection.on(\"acquire\", acquireListener);\n\n\t\t\t\tfor (const item of input) {\n\t\t\t\t\tawait addItem(item);\n\t\t\t\t}\n\n\t\t\t\tprocessMessages();\n\n\t\t\t\tlet count = output.length;\n\t\t\t\twhile (count > 0) {\n\t\t\t\t\tawait removeItem();\n\t\t\t\t\tcount -= 1;\n\t\t\t\t}\n\t\t\t\tassert.strictEqual(\n\t\t\t\t\tawait removeItem(),\n\t\t\t\t\tundefined,\n\t\t\t\t\t\"Remove from empty collection should undefined\",\n\t\t\t\t);\n\n\t\t\t\tassert.strictEqual(addCount, input.length, \"Incorrect number add event\");\n\t\t\t\tassert.strictEqual(removeCount, output.length, \"Incorrect number remove event\");\n\n\t\t\t\ttestCollection.off(\"add\", addListener);\n\t\t\t\ttestCollection.off(\"acquire\", acquireListener);\n\t\t\t});\n\n\t\t\tit(\"can clone object value\", async () => {\n\t\t\t\tconst obj = { x: 1 };\n\t\t\t\tawait addItem(obj);\n\t\t\t\tconst result = await removeItem();\n\t\t\t\tassert.notStrictEqual(result, obj);\n\t\t\t\tassert.strictEqual(result.x, 1);\n\t\t\t});\n\t\t});\n\t}\n\n\tdescribe(\"Detached\", () => {\n\t\tgenerate(\n\t\t\t[1, 2],\n\t\t\t[1, 2],\n\t\t\t() => createLocalCollection(\"consensus-ordered-collection\"),\n\t\t\t() => {},\n\t\t);\n\t});\n\n\tdescribe(\"Attached, connected\", () => {\n\t\tconst containerRuntimeFactory: MockContainerRuntimeFactory =\n\t\t\tnew MockContainerRuntimeFactory();\n\t\tlet counter = 0;\n\n\t\tgenerate(\n\t\t\t[1, 2],\n\t\t\t[1, 2],\n\t\t\t() =>\n\t\t\t\tcreateConnectedCollection(\n\t\t\t\t\t`consensus-ordered-collection_${++counter}`,\n\t\t\t\t\tcontainerRuntimeFactory,\n\t\t\t\t),\n\t\t\t() => {\n\t\t\t\tcontainerRuntimeFactory.processAllMessages();\n\t\t\t},\n\t\t);\n\t});\n\n\tdescribe(\"Reconnection flow\", () => {\n\t\tlet containerRuntimeFactory: MockContainerRuntimeFactoryForReconnection;\n\t\tlet containerRuntime1: MockContainerRuntimeForReconnection;\n\t\tlet testCollection1: IConsensusOrderedCollection;\n\t\tlet testCollection2: IConsensusOrderedCollection;\n\n\t\tbeforeEach(async () => {\n\t\t\tcontainerRuntimeFactory = new MockContainerRuntimeFactoryForReconnection();\n\n\t\t\t// Create first ConsensusOrderedCollection\n\t\t\tconst response1 = createCollectionForReconnection(\n\t\t\t\t\"collection1\",\n\t\t\t\tcontainerRuntimeFactory,\n\t\t\t);\n\t\t\ttestCollection1 = response1.collection;\n\t\t\tcontainerRuntime1 = response1.containerRuntime;\n\n\t\t\t// Create second ConsensusOrderedCollection\n\t\t\tconst response2 = createCollectionForReconnection(\n\t\t\t\t\"collection2\",\n\t\t\t\tcontainerRuntimeFactory,\n\t\t\t);\n\t\t\ttestCollection2 = response2.collection;\n\t\t});\n\n\t\tit(\"can resend unacked ops on reconnection\", async () => {\n\t\t\t/**\n\t\t\t * First, we will add a value to the first collection and verify the op is resent.\n\t\t\t */\n\t\t\tconst testValue = \"testValue\";\n\n\t\t\t// Add a listener to the second collection. This is used to verify that the added value reaches the remote\n\t\t\t// client.\n\t\t\tlet addedValue: string = \"\";\n\t\t\tlet newlyAdded: boolean = false;\n\t\t\ttestCollection2.on(\"add\", (value: any, added: boolean) => {\n\t\t\t\taddedValue = value;\n\t\t\t\tnewlyAdded = added;\n\t\t\t});\n\n\t\t\t// Add a value to the first ConsensusOrderedCollection\n\t\t\tconst waitP = testCollection1.add(testValue);\n\n\t\t\t// Disconnect and reconnect the first collection.\n\t\t\tcontainerRuntime1.connected = false;\n\t\t\tcontainerRuntime1.connected = true;\n\n\t\t\t// Process the messages.\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\n\t\t\tawait waitP;\n\n\t\t\t// Verify that the remote collection received the added value.\n\t\t\tassert.equal(\n\t\t\t\taddedValue,\n\t\t\t\ttestValue,\n\t\t\t\t\"The remote client did not receive the added value\",\n\t\t\t);\n\t\t\tassert.equal(newlyAdded, true, \"The remote client's value was not newly added\");\n\n\t\t\t/**\n\t\t\t * Now, we will acquire the added value in the first collection and verify the op is resent.\n\t\t\t */\n\n\t\t\t// Add a listener to the second collection. This is used to verify that the acquired op reaches the remote\n\t\t\t// client.\n\t\t\tlet acquiredValue: string = \"\";\n\t\t\tlet acquiredClientId: string | undefined = \"\";\n\t\t\ttestCollection2.on(\"acquire\", (value: any, clientId?: string) => {\n\t\t\t\tacquiredValue = value;\n\t\t\t\tacquiredClientId = clientId;\n\t\t\t});\n\n\t\t\t// Acquire the previously added value.\n\t\t\tlet res: any;\n\t\t\tconst resultP = testCollection1.acquire(async (value) => {\n\t\t\t\tres = value;\n\t\t\t\treturn ConsensusResult.Complete;\n\t\t\t});\n\n\t\t\t// Disconnect and reconnect the first collection.\n\t\t\tcontainerRuntime1.connected = false;\n\t\t\tcontainerRuntime1.connected = true;\n\n\t\t\t// Process the messages.\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\t\t\tsetImmediate(() => containerRuntimeFactory.processAllMessages());\n\n\t\t\tawait resultP;\n\n\t\t\t// Verify that the value acquired is the one that was added earlier.\n\t\t\tassert.equal(res, testValue, \"The acquired value does not match the added value\");\n\n\t\t\t// Verify that the remote collection received the acquired op.\n\t\t\tassert.equal(\n\t\t\t\tacquiredValue,\n\t\t\t\ttestValue,\n\t\t\t\t\"The remote client did not receive the acquired value\",\n\t\t\t);\n\t\t\tassert.equal(\n\t\t\t\tacquiredClientId,\n\t\t\t\tcontainerRuntime1.clientId,\n\t\t\t\t\"The remote client did not get the correct id of client that acquired the value\",\n\t\t\t);\n\t\t});\n\n\t\tit(\"can store ops in disconnected state and resend them on reconnection\", async () => {\n\t\t\tconst testValue = \"testValue\";\n\n\t\t\t// Add a listener to the second collection. This is used to verify that the added value reaches the\n\t\t\t// remote client.\n\t\t\tlet addedValue: string = \"\";\n\t\t\tlet newlyAdded: boolean = false;\n\t\t\ttestCollection2.on(\"add\", (value: any, added: boolean) => {\n\t\t\t\taddedValue = value;\n\t\t\t\tnewlyAdded = added;\n\t\t\t});\n\n\t\t\t// Disconnect the first collection\n\t\t\tcontainerRuntime1.connected = false;\n\n\t\t\t// Add a value to the first ConsensusOrderedCollection.\n\t\t\tconst waitP = testCollection1.add(testValue);\n\n\t\t\t// Reconnect the first collection.\n\t\t\tcontainerRuntime1.connected = true;\n\n\t\t\t// Process the messages.\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\n\t\t\tawait waitP;\n\n\t\t\t// Verify that the remote collection received the added value.\n\t\t\tassert.equal(\n\t\t\t\taddedValue,\n\t\t\t\ttestValue,\n\t\t\t\t\"The remote client did not receive the added value\",\n\t\t\t);\n\t\t\tassert.equal(newlyAdded, true, \"The remote client's value was not newly added\");\n\t\t});\n\t});\n\n\tdescribe(\"Garbage Collection\", () => {\n\t\tclass GCOrderedCollectionProvider implements IGCTestProvider {\n\t\t\tprivate _expectedRoutes: string[] = [];\n\t\t\tprivate subCollectionCount = 0;\n\t\t\tprivate readonly collection: IConsensusOrderedCollection;\n\t\t\tprivate readonly containerRuntimeFactory: MockContainerRuntimeFactory;\n\n\t\t\tconstructor() {\n\t\t\t\tthis.containerRuntimeFactory = new MockContainerRuntimeFactory();\n\t\t\t\tthis.collection = createConnectedCollection(\n\t\t\t\t\t\"ordered-collection\",\n\t\t\t\t\tthis.containerRuntimeFactory,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tprivate async addItem(item: any) {\n\t\t\t\tconst waitP = this.collection.add(item);\n\t\t\t\tthis.containerRuntimeFactory.processAllMessages();\n\t\t\t\treturn waitP;\n\t\t\t}\n\n\t\t\tprivate async removeItem() {\n\t\t\t\tconst resP = acquireAndComplete(this.collection);\n\t\t\t\tthis.containerRuntimeFactory.processAllMessages();\n\t\t\t\tsetImmediate(() => this.containerRuntimeFactory.processAllMessages());\n\t\t\t\treturn resP;\n\t\t\t}\n\n\t\t\tpublic get sharedObject() {\n\t\t\t\treturn this.collection;\n\t\t\t}\n\n\t\t\tpublic get expectedOutboundRoutes() {\n\t\t\t\treturn this._expectedRoutes;\n\t\t\t}\n\n\t\t\tpublic async addOutboundRoutes() {\n\t\t\t\tconst subCollection = createLocalCollection(\n\t\t\t\t\t`subCollection-${++this.subCollectionCount}`,\n\t\t\t\t);\n\t\t\t\tawait this.addItem(subCollection.handle);\n\t\t\t\tthis._expectedRoutes.push(subCollection.handle.absolutePath);\n\t\t\t}\n\n\t\t\tpublic async deleteOutboundRoutes() {\n\t\t\t\tconst deletedHandle = (await this.removeItem()) as IFluidHandle;\n\t\t\t\tassert(deletedHandle, \"Route must be added before deleting\");\n\t\t\t\t// Remove deleted handle's route from expected routes.\n\t\t\t\tthis._expectedRoutes = this._expectedRoutes.filter(\n\t\t\t\t\t(route) => route !== deletedHandle.absolutePath,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tpublic async addNestedHandles() {\n\t\t\t\tconst subCollection1 = createLocalCollection(\n\t\t\t\t\t`subCollection-${++this.subCollectionCount}`,\n\t\t\t\t);\n\t\t\t\tconst subCollection2 = createLocalCollection(\n\t\t\t\t\t`subCollection-${++this.subCollectionCount}`,\n\t\t\t\t);\n\t\t\t\tconst containingObject = {\n\t\t\t\t\tcollection1Handle: subCollection1.handle,\n\t\t\t\t\tnestedObj: {\n\t\t\t\t\t\tcollection2Handle: subCollection2.handle,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\tawait this.addItem(containingObject);\n\t\t\t\tthis._expectedRoutes.push(\n\t\t\t\t\tsubCollection1.handle.absolutePath,\n\t\t\t\t\tsubCollection2.handle.absolutePath,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\trunGCTests(GCOrderedCollectionProvider);\n\t});\n});\n"]}
@@ -1,24 +0,0 @@
1
- use_current_TypeAliasDeclaration_ConsensusCallback(get_old_TypeAliasDeclaration_ConsensusCallback());
2
- use_old_TypeAliasDeclaration_ConsensusCallback(get_current_TypeAliasDeclaration_ConsensusCallback());
3
- use_current_ClassDeclaration_ConsensusOrderedCollection(get_old_ClassDeclaration_ConsensusOrderedCollection());
4
- use_old_ClassDeclaration_ConsensusOrderedCollection(get_current_ClassDeclaration_ConsensusOrderedCollection());
5
- use_current_ClassDeclaration_ConsensusQueue(get_old_ClassDeclaration_ConsensusQueue());
6
- use_old_ClassDeclaration_ConsensusQueue(get_current_ClassDeclaration_ConsensusQueue());
7
- use_current_EnumDeclaration_ConsensusResult(get_old_EnumDeclaration_ConsensusResult());
8
- use_old_EnumDeclaration_ConsensusResult(get_current_EnumDeclaration_ConsensusResult());
9
- use_current_InterfaceDeclaration_IConsensusOrderedCollection(get_old_InterfaceDeclaration_IConsensusOrderedCollection());
10
- use_old_InterfaceDeclaration_IConsensusOrderedCollection(get_current_InterfaceDeclaration_IConsensusOrderedCollection());
11
- use_current_InterfaceDeclaration_IConsensusOrderedCollectionEvents(get_old_InterfaceDeclaration_IConsensusOrderedCollectionEvents());
12
- use_old_InterfaceDeclaration_IConsensusOrderedCollectionEvents(get_current_InterfaceDeclaration_IConsensusOrderedCollectionEvents());
13
- use_current_InterfaceDeclaration_IConsensusOrderedCollectionFactory(get_old_InterfaceDeclaration_IConsensusOrderedCollectionFactory());
14
- use_old_InterfaceDeclaration_IConsensusOrderedCollectionFactory(get_current_InterfaceDeclaration_IConsensusOrderedCollectionFactory());
15
- use_current_InterfaceDeclaration_IOrderedCollection(get_old_InterfaceDeclaration_IOrderedCollection());
16
- use_old_InterfaceDeclaration_IOrderedCollection(get_current_InterfaceDeclaration_IOrderedCollection());
17
- use_current_InterfaceDeclaration_ISnapshotable(get_old_InterfaceDeclaration_ISnapshotable());
18
- use_old_InterfaceDeclaration_ISnapshotable(get_current_InterfaceDeclaration_ISnapshotable());
19
- use_current_FunctionDeclaration_acquireAndComplete(get_old_FunctionDeclaration_acquireAndComplete());
20
- use_old_FunctionDeclaration_acquireAndComplete(get_current_FunctionDeclaration_acquireAndComplete());
21
- use_current_FunctionDeclaration_waitAcquireAndComplete(get_old_FunctionDeclaration_waitAcquireAndComplete());
22
- use_old_FunctionDeclaration_waitAcquireAndComplete(get_current_FunctionDeclaration_waitAcquireAndComplete());
23
- export {};
24
- //# sourceMappingURL=validateOrderedCollectionPrevious.generated.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validateOrderedCollectionPrevious.generated.js","sourceRoot":"","sources":["../../../src/test/types/validateOrderedCollectionPrevious.generated.ts"],"names":[],"mappings":"AAgCA,kDAAkD,CAC9C,8CAA8C,EAAE,CAAC,CAAC;AAWtD,8CAA8C,CAC1C,kDAAkD,EAAE,CAAC,CAAC;AAW1D,uDAAuD,CACnD,mDAAmD,EAAE,CAAC,CAAC;AAW3D,mDAAmD,CAC/C,uDAAuD,EAAE,CAAC,CAAC;AAW/D,2CAA2C,CACvC,uCAAuC,EAAE,CAAC,CAAC;AAW/C,uCAAuC,CACnC,2CAA2C,EAAE,CAAC,CAAC;AAWnD,2CAA2C,CACvC,uCAAuC,EAAE,CAAC,CAAC;AAW/C,uCAAuC,CACnC,2CAA2C,EAAE,CAAC,CAAC;AAWnD,4DAA4D,CACxD,wDAAwD,EAAE,CAAC,CAAC;AAWhE,wDAAwD,CACpD,4DAA4D,EAAE,CAAC,CAAC;AAWpE,kEAAkE,CAC9D,8DAA8D,EAAE,CAAC,CAAC;AAWtE,8DAA8D,CAC1D,kEAAkE,EAAE,CAAC,CAAC;AAW1E,mEAAmE,CAC/D,+DAA+D,EAAE,CAAC,CAAC;AAWvE,+DAA+D,CAC3D,mEAAmE,EAAE,CAAC,CAAC;AAW3E,mDAAmD,CAC/C,+CAA+C,EAAE,CAAC,CAAC;AAWvD,+CAA+C,CAC3C,mDAAmD,EAAE,CAAC,CAAC;AAW3D,8CAA8C,CAC1C,0CAA0C,EAAE,CAAC,CAAC;AAWlD,0CAA0C,CACtC,8CAA8C,EAAE,CAAC,CAAC;AAWtD,kDAAkD,CAC9C,8CAA8C,EAAE,CAAC,CAAC;AAWtD,8CAA8C,CAC1C,kDAAkD,EAAE,CAAC,CAAC;AAW1D,sDAAsD,CAClD,kDAAkD,EAAE,CAAC,CAAC;AAW1D,kDAAkD,CAC9C,sDAAsD,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by fluid-type-test-generator in @fluidframework/build-tools.\n */\nimport type * as old from \"@fluidframework/ordered-collection-previous\";\nimport type * as current from \"../../index.js\";\n\n\n// See 'build-tools/src/type-test-generator/compatibility.ts' for more information.\ntype TypeOnly<T> = T extends number\n\t? number\n\t: T extends string\n\t? string\n\t: T extends boolean | bigint | symbol\n\t? T\n\t: {\n\t\t\t[P in keyof T]: TypeOnly<T[P]>;\n\t };\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_ConsensusCallback\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_ConsensusCallback():\n TypeOnly<old.ConsensusCallback<any>>;\ndeclare function use_current_TypeAliasDeclaration_ConsensusCallback(\n use: TypeOnly<current.ConsensusCallback<any>>): void;\nuse_current_TypeAliasDeclaration_ConsensusCallback(\n get_old_TypeAliasDeclaration_ConsensusCallback());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_ConsensusCallback\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_ConsensusCallback():\n TypeOnly<current.ConsensusCallback<any>>;\ndeclare function use_old_TypeAliasDeclaration_ConsensusCallback(\n use: TypeOnly<old.ConsensusCallback<any>>): void;\nuse_old_TypeAliasDeclaration_ConsensusCallback(\n get_current_TypeAliasDeclaration_ConsensusCallback());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_ConsensusOrderedCollection\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_ConsensusOrderedCollection():\n TypeOnly<old.ConsensusOrderedCollection>;\ndeclare function use_current_ClassDeclaration_ConsensusOrderedCollection(\n use: TypeOnly<current.ConsensusOrderedCollection>): void;\nuse_current_ClassDeclaration_ConsensusOrderedCollection(\n get_old_ClassDeclaration_ConsensusOrderedCollection());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_ConsensusOrderedCollection\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_ConsensusOrderedCollection():\n TypeOnly<current.ConsensusOrderedCollection>;\ndeclare function use_old_ClassDeclaration_ConsensusOrderedCollection(\n use: TypeOnly<old.ConsensusOrderedCollection>): void;\nuse_old_ClassDeclaration_ConsensusOrderedCollection(\n get_current_ClassDeclaration_ConsensusOrderedCollection());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_ConsensusQueue\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_ConsensusQueue():\n TypeOnly<old.ConsensusQueue>;\ndeclare function use_current_ClassDeclaration_ConsensusQueue(\n use: TypeOnly<current.ConsensusQueue>): void;\nuse_current_ClassDeclaration_ConsensusQueue(\n get_old_ClassDeclaration_ConsensusQueue());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_ConsensusQueue\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_ConsensusQueue():\n TypeOnly<current.ConsensusQueue>;\ndeclare function use_old_ClassDeclaration_ConsensusQueue(\n use: TypeOnly<old.ConsensusQueue>): void;\nuse_old_ClassDeclaration_ConsensusQueue(\n get_current_ClassDeclaration_ConsensusQueue());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"EnumDeclaration_ConsensusResult\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_EnumDeclaration_ConsensusResult():\n TypeOnly<old.ConsensusResult>;\ndeclare function use_current_EnumDeclaration_ConsensusResult(\n use: TypeOnly<current.ConsensusResult>): void;\nuse_current_EnumDeclaration_ConsensusResult(\n get_old_EnumDeclaration_ConsensusResult());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"EnumDeclaration_ConsensusResult\": {\"backCompat\": false}\n*/\ndeclare function get_current_EnumDeclaration_ConsensusResult():\n TypeOnly<current.ConsensusResult>;\ndeclare function use_old_EnumDeclaration_ConsensusResult(\n use: TypeOnly<old.ConsensusResult>): void;\nuse_old_EnumDeclaration_ConsensusResult(\n get_current_EnumDeclaration_ConsensusResult());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IConsensusOrderedCollection\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IConsensusOrderedCollection():\n TypeOnly<old.IConsensusOrderedCollection>;\ndeclare function use_current_InterfaceDeclaration_IConsensusOrderedCollection(\n use: TypeOnly<current.IConsensusOrderedCollection>): void;\nuse_current_InterfaceDeclaration_IConsensusOrderedCollection(\n get_old_InterfaceDeclaration_IConsensusOrderedCollection());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IConsensusOrderedCollection\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IConsensusOrderedCollection():\n TypeOnly<current.IConsensusOrderedCollection>;\ndeclare function use_old_InterfaceDeclaration_IConsensusOrderedCollection(\n use: TypeOnly<old.IConsensusOrderedCollection>): void;\nuse_old_InterfaceDeclaration_IConsensusOrderedCollection(\n get_current_InterfaceDeclaration_IConsensusOrderedCollection());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IConsensusOrderedCollectionEvents\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IConsensusOrderedCollectionEvents():\n TypeOnly<old.IConsensusOrderedCollectionEvents<any>>;\ndeclare function use_current_InterfaceDeclaration_IConsensusOrderedCollectionEvents(\n use: TypeOnly<current.IConsensusOrderedCollectionEvents<any>>): void;\nuse_current_InterfaceDeclaration_IConsensusOrderedCollectionEvents(\n get_old_InterfaceDeclaration_IConsensusOrderedCollectionEvents());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IConsensusOrderedCollectionEvents\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IConsensusOrderedCollectionEvents():\n TypeOnly<current.IConsensusOrderedCollectionEvents<any>>;\ndeclare function use_old_InterfaceDeclaration_IConsensusOrderedCollectionEvents(\n use: TypeOnly<old.IConsensusOrderedCollectionEvents<any>>): void;\nuse_old_InterfaceDeclaration_IConsensusOrderedCollectionEvents(\n get_current_InterfaceDeclaration_IConsensusOrderedCollectionEvents());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IConsensusOrderedCollectionFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IConsensusOrderedCollectionFactory():\n TypeOnly<old.IConsensusOrderedCollectionFactory>;\ndeclare function use_current_InterfaceDeclaration_IConsensusOrderedCollectionFactory(\n use: TypeOnly<current.IConsensusOrderedCollectionFactory>): void;\nuse_current_InterfaceDeclaration_IConsensusOrderedCollectionFactory(\n get_old_InterfaceDeclaration_IConsensusOrderedCollectionFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IConsensusOrderedCollectionFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IConsensusOrderedCollectionFactory():\n TypeOnly<current.IConsensusOrderedCollectionFactory>;\ndeclare function use_old_InterfaceDeclaration_IConsensusOrderedCollectionFactory(\n use: TypeOnly<old.IConsensusOrderedCollectionFactory>): void;\nuse_old_InterfaceDeclaration_IConsensusOrderedCollectionFactory(\n get_current_InterfaceDeclaration_IConsensusOrderedCollectionFactory());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IOrderedCollection\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IOrderedCollection():\n TypeOnly<old.IOrderedCollection>;\ndeclare function use_current_InterfaceDeclaration_IOrderedCollection(\n use: TypeOnly<current.IOrderedCollection>): void;\nuse_current_InterfaceDeclaration_IOrderedCollection(\n get_old_InterfaceDeclaration_IOrderedCollection());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IOrderedCollection\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IOrderedCollection():\n TypeOnly<current.IOrderedCollection>;\ndeclare function use_old_InterfaceDeclaration_IOrderedCollection(\n use: TypeOnly<old.IOrderedCollection>): void;\nuse_old_InterfaceDeclaration_IOrderedCollection(\n get_current_InterfaceDeclaration_IOrderedCollection());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISnapshotable\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ISnapshotable():\n TypeOnly<old.ISnapshotable<any>>;\ndeclare function use_current_InterfaceDeclaration_ISnapshotable(\n use: TypeOnly<current.ISnapshotable<any>>): void;\nuse_current_InterfaceDeclaration_ISnapshotable(\n get_old_InterfaceDeclaration_ISnapshotable());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISnapshotable\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ISnapshotable():\n TypeOnly<current.ISnapshotable<any>>;\ndeclare function use_old_InterfaceDeclaration_ISnapshotable(\n use: TypeOnly<old.ISnapshotable<any>>): void;\nuse_old_InterfaceDeclaration_ISnapshotable(\n get_current_InterfaceDeclaration_ISnapshotable());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_acquireAndComplete\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_acquireAndComplete():\n TypeOnly<typeof old.acquireAndComplete>;\ndeclare function use_current_FunctionDeclaration_acquireAndComplete(\n use: TypeOnly<typeof current.acquireAndComplete>): void;\nuse_current_FunctionDeclaration_acquireAndComplete(\n get_old_FunctionDeclaration_acquireAndComplete());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_acquireAndComplete\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_acquireAndComplete():\n TypeOnly<typeof current.acquireAndComplete>;\ndeclare function use_old_FunctionDeclaration_acquireAndComplete(\n use: TypeOnly<typeof old.acquireAndComplete>): void;\nuse_old_FunctionDeclaration_acquireAndComplete(\n get_current_FunctionDeclaration_acquireAndComplete());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_waitAcquireAndComplete\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_waitAcquireAndComplete():\n TypeOnly<typeof old.waitAcquireAndComplete>;\ndeclare function use_current_FunctionDeclaration_waitAcquireAndComplete(\n use: TypeOnly<typeof current.waitAcquireAndComplete>): void;\nuse_current_FunctionDeclaration_waitAcquireAndComplete(\n get_old_FunctionDeclaration_waitAcquireAndComplete());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_waitAcquireAndComplete\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_waitAcquireAndComplete():\n TypeOnly<typeof current.waitAcquireAndComplete>;\ndeclare function use_old_FunctionDeclaration_waitAcquireAndComplete(\n use: TypeOnly<typeof old.waitAcquireAndComplete>): void;\nuse_old_FunctionDeclaration_waitAcquireAndComplete(\n get_current_FunctionDeclaration_waitAcquireAndComplete());\n"]}
File without changes