Skip to content

Commit 975c95f

Browse files
committed
chore(json-crdt-extensions): 🤖 cleanup marker overlay code
1 parent eb7fc09 commit 975c95f

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

src/json-crdt-extensions/peritext/overlay/MarkerOverlayPoint.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ export class MarkerOverlayPoint<T = string> extends OverlayPoint<T> implements H
2222
super(rga, id, anchor);
2323
}
2424

25-
/**
26-
* @todo Rename or access it directly.
27-
* @deprecated
28-
*/
29-
public markerHash(): number {
30-
return this.marker ? this.marker.hash : 0;
31-
}
32-
3325
public type(): SliceType {
3426
return this.marker && this.marker.type;
3527
}
@@ -59,7 +51,7 @@ export class MarkerOverlayPoint<T = string> extends OverlayPoint<T> implements H
5951
);
6052
}
6153

62-
// ---------------------------------------------------------------- Printable
54+
// ------------------------------------------------------------ HeadlessNode2
6355

6456
public p2: MarkerOverlayPoint<T> | undefined;
6557
public l2: MarkerOverlayPoint<T> | undefined;

src/json-crdt-extensions/peritext/overlay/OverlayPoint.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ export class OverlayPoint<T = string> extends Point<T> implements Printable, Hea
8585
/**
8686
* Collapsed slices - markers (block splits), which represent a single point
8787
* in the text, even if the start and end of the slice are different.
88-
* @deprecated This field might happen to be not necessary.
8988
*/
9089
public readonly markers: Slice<T>[] = [];
9190

@@ -96,10 +95,8 @@ export class OverlayPoint<T = string> extends Point<T> implements Printable, Hea
9695
* the state of the point. The markers are sorted by the slice ID.
9796
*
9897
* @param slice Slice to add to the marker list.
99-
* @deprecated This method might happen to be not necessary.
10098
*/
10199
public addMarker(slice: Slice<T>): void {
102-
/** @deprecated */
103100
const markers = this.markers;
104101
const length = markers.length;
105102
if (!length) {
@@ -131,10 +128,8 @@ export class OverlayPoint<T = string> extends Point<T> implements Printable, Hea
131128
* the text, even if the start and end of the slice are different.
132129
*
133130
* @param slice Slice to remove from the marker list.
134-
* @deprecated This method might happen to be not necessary.
135131
*/
136132
public removeMarker(slice: Slice<T>): void {
137-
/** @deprecated */
138133
const markers = this.markers;
139134
const length = markers.length;
140135
for (let i = 0; i < length; i++) {

0 commit comments

Comments
 (0)