mute-structs
Version:
NodeJS module providing an implementation of the LogootSplit CRDT algorithm
26 lines (25 loc) • 1.11 kB
TypeScript
import { IdentifierInterval } from "../../identifierinterval";
import { LogootSRopes } from "../../logootsropes";
import { LogootSOperation } from "../logootsoperation";
import { TextDelete } from "./textdelete";
/**
* Represents a LogootSplit delete operation.
*/
export declare class LogootSDel extends LogootSOperation {
static fromPlain(o: unknown): LogootSDel | null;
readonly lid: IdentifierInterval[];
readonly author: number;
/**
* @constructor
* @param {IdentifierInterval[]} lid - the list of identifier that localise the deletion in the logoot sequence.
* @param {number} author - the author of the operation.
*/
constructor(lid: IdentifierInterval[], author: number);
equals(aOther: LogootSDel): boolean;
/**
* Apply the current delete operation to a LogootSplit document.
* @param {LogootSRopes} doc - the LogootSplit document on which the deletions wil be performed.
* @return {TextDelete[]} the list of deletions to be applied on the sequence representing the document content.
*/
execute(doc: LogootSRopes): TextDelete[];
}