Skip to content

Commit

Permalink
style(json-crdt-extensions): 💄 apply linter suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Apr 15, 2024
1 parent 2024b02 commit 7152fe9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/json-crdt-extensions/peritext/slice/Range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ export class Range implements Printable {
return p1.compareSpatial(p2) > 0 ? new Range(txt, p2, p1) : new Range(txt, p1, p2);
}

constructor(protected readonly txt: Peritext, public start: Point, public end: Point) {}
constructor(
protected readonly txt: Peritext,
public start: Point,
public end: Point,
) {}

public clone(): Range {
return new Range(this.txt, this.start.clone(), this.end.clone());
Expand Down Expand Up @@ -38,7 +42,7 @@ export class Range implements Printable {
}

public collapseToStart(): void {
this.start = this.start.clone()
this.start = this.start.clone();
this.start.refAfter();
this.end = this.start.clone();
}
Expand Down
5 changes: 4 additions & 1 deletion src/json-crdt-extensions/peritext/slice/Slices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import type {ArrChunk, ArrNode} from '../../../json-crdt/nodes';
export class Slices implements Stateful, Printable {
private list = new Map<ArrChunk, PersistedSlice>();

constructor(public readonly txt: Peritext, public readonly set: ArrNode) {}
constructor(
public readonly txt: Peritext,
public readonly set: ArrNode,
) {}

public ins(range: Range, behavior: SliceBehavior, type: SliceType, data?: unknown): PersistedSlice {
const peritext = this.txt;
Expand Down

0 comments on commit 7152fe9

Please sign in to comment.