@fluidframework/sequence 1.2.1 → 2.0.0-internal.1.0.0.81601
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/intervalCollection.d.ts +5 -10
- package/dist/intervalCollection.d.ts.map +1 -1
- package/dist/intervalCollection.js +20 -35
- package/dist/intervalCollection.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/sequence.d.ts +5 -17
- package/dist/sequence.d.ts.map +1 -1
- package/dist/sequence.js +4 -28
- package/dist/sequence.js.map +1 -1
- package/dist/sequenceDeltaEvent.d.ts +0 -6
- package/dist/sequenceDeltaEvent.d.ts.map +1 -1
- package/dist/sequenceDeltaEvent.js +0 -1
- package/dist/sequenceDeltaEvent.js.map +1 -1
- package/dist/sharedString.d.ts +4 -0
- package/dist/sharedString.d.ts.map +1 -1
- package/dist/sharedString.js +11 -0
- package/dist/sharedString.js.map +1 -1
- package/lib/intervalCollection.d.ts +5 -10
- package/lib/intervalCollection.d.ts.map +1 -1
- package/lib/intervalCollection.js +21 -36
- package/lib/intervalCollection.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/sequence.d.ts +5 -17
- package/lib/sequence.d.ts.map +1 -1
- package/lib/sequence.js +5 -29
- package/lib/sequence.js.map +1 -1
- package/lib/sequenceDeltaEvent.d.ts +0 -6
- package/lib/sequenceDeltaEvent.d.ts.map +1 -1
- package/lib/sequenceDeltaEvent.js +0 -1
- package/lib/sequenceDeltaEvent.js.map +1 -1
- package/lib/sharedString.d.ts +4 -0
- package/lib/sharedString.d.ts.map +1 -1
- package/lib/sharedString.js +11 -0
- package/lib/sharedString.js.map +1 -1
- package/package.json +60 -20
- package/src/intervalCollection.ts +33 -53
- package/src/packageVersion.ts +1 -1
- package/src/sequence.ts +4 -36
- package/src/sequenceDeltaEvent.ts +0 -7
- package/src/sharedString.ts +13 -2
|
@@ -11,6 +11,7 @@ import { UsageError } from "@fluidframework/container-utils";
|
|
|
11
11
|
import {
|
|
12
12
|
addProperties,
|
|
13
13
|
Client,
|
|
14
|
+
compareReferencePositions,
|
|
14
15
|
ConflictAction,
|
|
15
16
|
createMap,
|
|
16
17
|
ICombiningOp,
|
|
@@ -19,15 +20,18 @@ import {
|
|
|
19
20
|
IntervalNode,
|
|
20
21
|
IntervalTree,
|
|
21
22
|
ISegment,
|
|
22
|
-
LocalReference,
|
|
23
23
|
MergeTreeDeltaType,
|
|
24
|
+
minReferencePosition,
|
|
24
25
|
PropertiesManager,
|
|
25
26
|
PropertySet,
|
|
26
27
|
RedBlackTree,
|
|
28
|
+
LocalReferencePosition,
|
|
27
29
|
ReferenceType,
|
|
28
30
|
refTypeIncludesFlag,
|
|
29
31
|
reservedRangeLabelsKey,
|
|
30
32
|
UnassignedSequenceNumber,
|
|
33
|
+
maxReferencePosition,
|
|
34
|
+
createDetachedLocalReferencePosition,
|
|
31
35
|
} from "@fluidframework/merge-tree";
|
|
32
36
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
33
37
|
import { LoggingError } from "@fluidframework/telemetry-utils";
|
|
@@ -295,8 +299,9 @@ export class SequenceInterval implements ISerializableInterval {
|
|
|
295
299
|
public propertyManager: PropertiesManager;
|
|
296
300
|
|
|
297
301
|
constructor(
|
|
298
|
-
|
|
299
|
-
public
|
|
302
|
+
private readonly client: Client,
|
|
303
|
+
public start: LocalReferencePosition,
|
|
304
|
+
public end: LocalReferencePosition,
|
|
300
305
|
public intervalType: IntervalType,
|
|
301
306
|
props?: PropertySet,
|
|
302
307
|
) {
|
|
@@ -341,8 +346,8 @@ export class SequenceInterval implements ISerializableInterval {
|
|
|
341
346
|
}
|
|
342
347
|
|
|
343
348
|
public serialize(client: Client): ISerializedInterval {
|
|
344
|
-
const startPosition = this.start
|
|
345
|
-
const endPosition = this.end
|
|
349
|
+
const startPosition = client.localReferencePositionToPosition(this.start);
|
|
350
|
+
const endPosition = client.localReferencePositionToPosition(this.end);
|
|
346
351
|
const serializedInterval: ISerializedInterval = {
|
|
347
352
|
end: endPosition,
|
|
348
353
|
intervalType: this.intervalType,
|
|
@@ -358,7 +363,7 @@ export class SequenceInterval implements ISerializableInterval {
|
|
|
358
363
|
}
|
|
359
364
|
|
|
360
365
|
public clone() {
|
|
361
|
-
return new SequenceInterval(this.start, this.end, this.intervalType, this.properties);
|
|
366
|
+
return new SequenceInterval(this.client, this.start, this.end, this.intervalType, this.properties);
|
|
362
367
|
}
|
|
363
368
|
|
|
364
369
|
public compare(b: SequenceInterval) {
|
|
@@ -384,16 +389,16 @@ export class SequenceInterval implements ISerializableInterval {
|
|
|
384
389
|
}
|
|
385
390
|
|
|
386
391
|
public compareStart(b: SequenceInterval) {
|
|
387
|
-
return this.start
|
|
392
|
+
return compareReferencePositions(this.start, b.start);
|
|
388
393
|
}
|
|
389
394
|
|
|
390
395
|
public compareEnd(b: SequenceInterval) {
|
|
391
|
-
return this.end
|
|
396
|
+
return compareReferencePositions(this.end, b.end);
|
|
392
397
|
}
|
|
393
398
|
|
|
394
399
|
public overlaps(b: SequenceInterval) {
|
|
395
|
-
const result = (this.start
|
|
396
|
-
(this.end
|
|
400
|
+
const result = (compareReferencePositions(this.start, b.end) <= 0) &&
|
|
401
|
+
(compareReferencePositions(this.end, b.start) >= 0);
|
|
397
402
|
return result;
|
|
398
403
|
}
|
|
399
404
|
|
|
@@ -406,8 +411,8 @@ export class SequenceInterval implements ISerializableInterval {
|
|
|
406
411
|
}
|
|
407
412
|
|
|
408
413
|
public union(b: SequenceInterval) {
|
|
409
|
-
return new SequenceInterval(this.start
|
|
410
|
-
this.end
|
|
414
|
+
return new SequenceInterval(this.client, minReferencePosition(this.start, b.start),
|
|
415
|
+
maxReferencePosition(this.end, b.end), this.intervalType);
|
|
411
416
|
}
|
|
412
417
|
|
|
413
418
|
public addProperties(
|
|
@@ -421,8 +426,8 @@ export class SequenceInterval implements ISerializableInterval {
|
|
|
421
426
|
}
|
|
422
427
|
|
|
423
428
|
public overlapsPos(bstart: number, bend: number) {
|
|
424
|
-
const startPos = this.
|
|
425
|
-
const endPos = this.
|
|
429
|
+
const startPos = this.client.localReferencePositionToPosition(this.start);
|
|
430
|
+
const endPos = this.client.localReferencePositionToPosition(this.end);
|
|
426
431
|
return (endPos > bstart) && (startPos < bend);
|
|
427
432
|
}
|
|
428
433
|
|
|
@@ -438,20 +443,17 @@ export class SequenceInterval implements ISerializableInterval {
|
|
|
438
443
|
|
|
439
444
|
let startRef = this.start;
|
|
440
445
|
if (start !== undefined) {
|
|
441
|
-
startRef = createPositionReference(this.
|
|
446
|
+
startRef = createPositionReference(this.client, start, getRefType(this.start.refType), op);
|
|
442
447
|
startRef.addProperties(this.start.properties);
|
|
443
448
|
}
|
|
444
449
|
|
|
445
450
|
let endRef = this.end;
|
|
446
451
|
if (end !== undefined) {
|
|
447
|
-
endRef = createPositionReference(this.
|
|
452
|
+
endRef = createPositionReference(this.client, end, getRefType(this.end.refType), op);
|
|
448
453
|
endRef.addProperties(this.end.properties);
|
|
449
454
|
}
|
|
450
455
|
|
|
451
|
-
|
|
452
|
-
endRef.pairedRef = startRef;
|
|
453
|
-
|
|
454
|
-
const newInterval = new SequenceInterval(startRef, endRef, this.intervalType);
|
|
456
|
+
const newInterval = new SequenceInterval(this.client, startRef, endRef, this.intervalType);
|
|
455
457
|
if (this.properties) {
|
|
456
458
|
newInterval.initializeProperties();
|
|
457
459
|
this.propertyManager.copyTo(this.properties, newInterval.properties, newInterval.propertyManager);
|
|
@@ -473,16 +475,16 @@ function createPositionReferenceFromSegoff(
|
|
|
473
475
|
client: Client,
|
|
474
476
|
segoff: { segment: ISegment | undefined; offset: number | undefined; },
|
|
475
477
|
refType: ReferenceType,
|
|
476
|
-
op?: ISequencedDocumentMessage):
|
|
478
|
+
op?: ISequencedDocumentMessage): LocalReferencePosition {
|
|
477
479
|
if (segoff.segment) {
|
|
478
480
|
const ref = client.createLocalReferencePosition(segoff.segment, segoff.offset, refType, undefined);
|
|
479
|
-
return ref
|
|
481
|
+
return ref;
|
|
480
482
|
} else {
|
|
481
483
|
if (!op && !refTypeIncludesFlag(refType, ReferenceType.Transient)) {
|
|
482
484
|
throw new UsageError("Non-transient references need segment");
|
|
483
485
|
}
|
|
484
|
-
return new LocalReference(client, undefined, 0, refType);
|
|
485
486
|
}
|
|
487
|
+
return createDetachedLocalReferencePosition(refType);
|
|
486
488
|
}
|
|
487
489
|
|
|
488
490
|
function createPositionReference(
|
|
@@ -490,7 +492,7 @@ function createPositionReference(
|
|
|
490
492
|
pos: number,
|
|
491
493
|
refType: ReferenceType,
|
|
492
494
|
op?: ISequencedDocumentMessage,
|
|
493
|
-
fromSnapshot?: boolean):
|
|
495
|
+
fromSnapshot?: boolean): LocalReferencePosition {
|
|
494
496
|
let segoff;
|
|
495
497
|
if (op) {
|
|
496
498
|
assert((refType & ReferenceType.SlideOnRemove) !== 0, 0x2f5 /* op create references must be SlideOnRemove */);
|
|
@@ -536,15 +538,13 @@ function createSequenceInterval(
|
|
|
536
538
|
|
|
537
539
|
const startLref = createPositionReference(client, start, beginRefType, op, fromSnapshot);
|
|
538
540
|
const endLref = createPositionReference(client, end, endRefType, op, fromSnapshot);
|
|
539
|
-
startLref.pairedRef = endLref;
|
|
540
|
-
endLref.pairedRef = startLref;
|
|
541
541
|
const rangeProp = {
|
|
542
542
|
[reservedRangeLabelsKey]: [label],
|
|
543
543
|
};
|
|
544
544
|
startLref.addProperties(rangeProp);
|
|
545
545
|
endLref.addProperties(rangeProp);
|
|
546
546
|
|
|
547
|
-
const ival = new SequenceInterval(startLref, endLref, intervalType, rangeProp);
|
|
547
|
+
const ival = new SequenceInterval(client, startLref, endLref, intervalType, rangeProp);
|
|
548
548
|
return ival;
|
|
549
549
|
}
|
|
550
550
|
|
|
@@ -867,7 +867,8 @@ export class LocalIntervalCollection<TInterval extends ISerializableInterval> {
|
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
|
|
870
|
-
const compareSequenceIntervalEnds = (a: SequenceInterval, b: SequenceInterval): number =>
|
|
870
|
+
const compareSequenceIntervalEnds = (a: SequenceInterval, b: SequenceInterval): number =>
|
|
871
|
+
compareReferencePositions(a.end, b.end);
|
|
871
872
|
|
|
872
873
|
class SequenceIntervalCollectionFactory
|
|
873
874
|
implements IValueFactory<IntervalCollection<SequenceInterval>> {
|
|
@@ -1330,11 +1331,6 @@ export class IntervalCollection<TInterval extends ISerializableInterval>
|
|
|
1330
1331
|
return entries && entries.length !== 0;
|
|
1331
1332
|
}
|
|
1332
1333
|
|
|
1333
|
-
/** @deprecated - use ackChange */
|
|
1334
|
-
public changeInterval(serializedInterval: ISerializedInterval, local: boolean, op: ISequencedDocumentMessage) {
|
|
1335
|
-
return this.ackChange(serializedInterval, local, op);
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
1334
|
/** @internal */
|
|
1339
1335
|
public ackChange(serializedInterval: ISerializedInterval, local: boolean, op: ISequencedDocumentMessage) {
|
|
1340
1336
|
if (!this.attached) {
|
|
@@ -1446,15 +1442,15 @@ export class IntervalCollection<TInterval extends ISerializableInterval>
|
|
|
1446
1442
|
return rebased;
|
|
1447
1443
|
}
|
|
1448
1444
|
|
|
1449
|
-
private getSlideToSegment(lref:
|
|
1450
|
-
const segoff = { segment: lref.
|
|
1445
|
+
private getSlideToSegment(lref: LocalReferencePosition) {
|
|
1446
|
+
const segoff = { segment: lref.getSegment(), offset: lref.getOffset() };
|
|
1451
1447
|
const newSegoff = this.client.getSlideToSegment(segoff);
|
|
1452
1448
|
const value: { segment: ISegment | undefined; offset: number | undefined; } | undefined
|
|
1453
1449
|
= (segoff.segment === newSegoff.segment && segoff.offset === newSegoff.offset) ? undefined : newSegoff;
|
|
1454
1450
|
return value;
|
|
1455
1451
|
}
|
|
1456
1452
|
|
|
1457
|
-
private setSlideOnRemove(lref:
|
|
1453
|
+
private setSlideOnRemove(lref: LocalReferencePosition) {
|
|
1458
1454
|
let refType = lref.refType;
|
|
1459
1455
|
refType = refType & ~ReferenceType.StayOnRemove;
|
|
1460
1456
|
refType = refType | ReferenceType.SlideOnRemove;
|
|
@@ -1493,7 +1489,7 @@ export class IntervalCollection<TInterval extends ISerializableInterval>
|
|
|
1493
1489
|
if (needsStartUpdate || needsEndUpdate) {
|
|
1494
1490
|
// In this case, where we change the start or end of an interval,
|
|
1495
1491
|
// it is necessary to remove and re-add the interval listeners.
|
|
1496
|
-
// This ensures that the correct listeners are added to the
|
|
1492
|
+
// This ensures that the correct listeners are added to the LocalReferencePosition.
|
|
1497
1493
|
this.localCollection.removeExistingInterval(interval);
|
|
1498
1494
|
|
|
1499
1495
|
if (needsStartUpdate) {
|
|
@@ -1516,14 +1512,6 @@ export class IntervalCollection<TInterval extends ISerializableInterval>
|
|
|
1516
1512
|
}
|
|
1517
1513
|
}
|
|
1518
1514
|
|
|
1519
|
-
/** @deprecated - use ackAdd */
|
|
1520
|
-
public addInternal(
|
|
1521
|
-
serializedInterval: ISerializedInterval,
|
|
1522
|
-
local: boolean,
|
|
1523
|
-
op: ISequencedDocumentMessage) {
|
|
1524
|
-
return this.ackAdd(serializedInterval, local, op);
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
1515
|
/** @internal */
|
|
1528
1516
|
public ackAdd(
|
|
1529
1517
|
serializedInterval: ISerializedInterval,
|
|
@@ -1562,14 +1550,6 @@ export class IntervalCollection<TInterval extends ISerializableInterval>
|
|
|
1562
1550
|
return interval;
|
|
1563
1551
|
}
|
|
1564
1552
|
|
|
1565
|
-
/** @deprecated - use ackDelete */
|
|
1566
|
-
public deleteInterval(
|
|
1567
|
-
serializedInterval: ISerializedInterval,
|
|
1568
|
-
local: boolean,
|
|
1569
|
-
op: ISequencedDocumentMessage): void {
|
|
1570
|
-
return this.ackDelete(serializedInterval, local, op);
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
1553
|
/** @internal */
|
|
1574
1554
|
public ackDelete(
|
|
1575
1555
|
serializedInterval: ISerializedInterval,
|
package/src/packageVersion.ts
CHANGED
package/src/sequence.ts
CHANGED
|
@@ -29,7 +29,6 @@ import {
|
|
|
29
29
|
IRelativePosition,
|
|
30
30
|
ISegment,
|
|
31
31
|
ISegmentAction,
|
|
32
|
-
LocalReference,
|
|
33
32
|
LocalReferencePosition,
|
|
34
33
|
matchProperties,
|
|
35
34
|
MergeTreeDeltaType,
|
|
@@ -298,20 +297,6 @@ export abstract class SharedSegmentSequence<T extends ISegment>
|
|
|
298
297
|
return this.client.getRangeExtentsOfPosition(pos);
|
|
299
298
|
}
|
|
300
299
|
|
|
301
|
-
/**
|
|
302
|
-
* @deprecated - use createLocalReferencePosition
|
|
303
|
-
*/
|
|
304
|
-
public createPositionReference(
|
|
305
|
-
segment: T,
|
|
306
|
-
offset: number,
|
|
307
|
-
refType: ReferenceType): LocalReference {
|
|
308
|
-
const lref = new LocalReference(this.client, segment, offset, refType);
|
|
309
|
-
if (refType !== ReferenceType.Transient) {
|
|
310
|
-
this.addLocalReference(lref);
|
|
311
|
-
}
|
|
312
|
-
return lref;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
300
|
public createLocalReferencePosition(
|
|
316
301
|
segment: T,
|
|
317
302
|
offset: number,
|
|
@@ -324,13 +309,6 @@ export abstract class SharedSegmentSequence<T extends ISegment>
|
|
|
324
309
|
properties);
|
|
325
310
|
}
|
|
326
311
|
|
|
327
|
-
/**
|
|
328
|
-
* @deprecated - use localReferencePositionToPosition
|
|
329
|
-
*/
|
|
330
|
-
public localRefToPos(localRef: LocalReference) {
|
|
331
|
-
return this.client.localReferencePositionToPosition(localRef);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
312
|
public localReferencePositionToPosition(lref: ReferencePosition): number {
|
|
335
313
|
return this.client.localReferencePositionToPosition(lref);
|
|
336
314
|
}
|
|
@@ -377,20 +355,6 @@ export abstract class SharedSegmentSequence<T extends ISegment>
|
|
|
377
355
|
}
|
|
378
356
|
}
|
|
379
357
|
|
|
380
|
-
/**
|
|
381
|
-
* @deprecated - use createLocalReferencePosition
|
|
382
|
-
*/
|
|
383
|
-
public addLocalReference(lref: LocalReference) {
|
|
384
|
-
return this.client.addLocalReference(lref);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* @deprecated - use removeLocalReferencePosition
|
|
389
|
-
*/
|
|
390
|
-
public removeLocalReference(lref: LocalReference) {
|
|
391
|
-
return this.client.removeLocalReferencePosition(lref);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
358
|
public removeLocalReferencePosition(lref: LocalReferencePosition) {
|
|
395
359
|
return this.client.removeLocalReferencePosition(lref);
|
|
396
360
|
}
|
|
@@ -424,6 +388,10 @@ export abstract class SharedSegmentSequence<T extends ISegment>
|
|
|
424
388
|
return this.client.walkSegments<TClientData>(handler, start, end, accum, splitRange);
|
|
425
389
|
}
|
|
426
390
|
|
|
391
|
+
/**
|
|
392
|
+
* @deprecated for internal use only. public export will be removed.
|
|
393
|
+
* @internal
|
|
394
|
+
*/
|
|
427
395
|
public getStackContext(startPos: number, rangeLabels: string[]): RangeStackMap {
|
|
428
396
|
return this.client.getStackContext(startPos, rangeLabels);
|
|
429
397
|
}
|
|
@@ -25,12 +25,6 @@ import {
|
|
|
25
25
|
* They will not take into any future modifications performed to the underlying sequence and merge tree.
|
|
26
26
|
*/
|
|
27
27
|
export abstract class SequenceEvent<TOperation extends MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationTypes> {
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated - Events no longer fire when the change they correspond to had no impact (e.g. a remote delete
|
|
30
|
-
* event for a range that had already been deleted locally).
|
|
31
|
-
* Clients can therefore assume this property is false.
|
|
32
|
-
*/
|
|
33
|
-
public readonly isEmpty: boolean;
|
|
34
28
|
public readonly deltaOperation: TOperation;
|
|
35
29
|
private readonly sortedRanges: Lazy<SortedSegmentSet<ISequenceDeltaRange<TOperation>>>;
|
|
36
30
|
private readonly pFirst: Lazy<ISequenceDeltaRange<TOperation>>;
|
|
@@ -41,7 +35,6 @@ export abstract class SequenceEvent<TOperation extends MergeTreeDeltaOperationTy
|
|
|
41
35
|
private readonly mergeTreeClient: Client,
|
|
42
36
|
) {
|
|
43
37
|
assert(deltaArgs.deltaSegments.length > 0, 0x2d8 /* "Empty change event should not be emitted." */);
|
|
44
|
-
this.isEmpty = false;
|
|
45
38
|
this.deltaOperation = deltaArgs.operation;
|
|
46
39
|
|
|
47
40
|
this.sortedRanges = new Lazy<SortedSegmentSet<ISequenceDeltaRange<TOperation>>>(
|
package/src/sharedString.ts
CHANGED
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
ICombiningOp,
|
|
8
8
|
IMergeTreeInsertMsg,
|
|
9
9
|
IMergeTreeRemoveMsg,
|
|
10
|
+
IMergeTreeTextHelper,
|
|
10
11
|
IRelativePosition,
|
|
11
12
|
ISegment,
|
|
12
13
|
Marker,
|
|
13
|
-
MergeTreeTextHelper,
|
|
14
14
|
PropertySet,
|
|
15
15
|
ReferencePosition,
|
|
16
16
|
ReferenceType,
|
|
@@ -81,7 +81,7 @@ export class SharedString extends SharedSegmentSequence<SharedStringSegment> imp
|
|
|
81
81
|
return this;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
private readonly mergeTreeTextHelper:
|
|
84
|
+
private readonly mergeTreeTextHelper: IMergeTreeTextHelper;
|
|
85
85
|
|
|
86
86
|
constructor(document: IFluidDataStoreRuntime, public id: string, attributes: IChannelAttributes) {
|
|
87
87
|
super(document, id, attributes, SharedStringFactory.segmentFromSpec);
|
|
@@ -260,4 +260,15 @@ export class SharedString extends SharedSegmentSequence<SharedStringSegment> imp
|
|
|
260
260
|
public getMarkerFromId(id: string): ISegment {
|
|
261
261
|
return this.client.getMarkerFromId(id);
|
|
262
262
|
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Revert an op
|
|
266
|
+
*/
|
|
267
|
+
protected rollback(content: any, localOpMetadata: unknown): void {
|
|
268
|
+
if (this.client.rollback !== undefined) {
|
|
269
|
+
this.client.rollback(content, localOpMetadata);
|
|
270
|
+
} else {
|
|
271
|
+
super.rollback(content, localOpMetadata);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
263
274
|
}
|