All files / collaborative-str/src Selection.ts

100% Statements 8/8
100% Branches 0/0
100% Functions 1/1
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19    1x   3x   3x   3x   3x   3x   3x   3x    
import type {ITimestampStruct} from 'json-joy/lib/json-crdt-patch/clock';
 
export class Selection {
  /** Local selection start. */
  public start: number | null = null;
  /** Local selection end. */
  public end: number | null = null;
  /** Local selection direction. */
  public dir: -1 | 0 | 1 = 0;
  /** Timestamp when selection last updated. */
  public ts: number = 0;
  /** Model tick. */
  public tick: number = 0;
  /** Remote selection start. */
  public startId: ITimestampStruct | null = null;
  /** Remote selection end. */
  public endId: ITimestampStruct | null = null;
}