UNPKG

mute-structs

Version:

NodeJS module providing an implementation of the LogootSplit CRDT algorithm

24 lines (23 loc) 1.01 kB
import { LogootSRopes } from "../../logootsropes"; import { TextOperation } from "../textoperation"; import { LogootSDel } from "./logootsdel"; /** * Represents a sequence operation (deletion). */ export declare class TextDelete extends TextOperation { readonly length: number; /** * @constructor * @param {number} index - the position of the first element to be deleted in the sequence. * @param {number} length - the length of the range to be deleted in the sequence. * @param {number} author - the author of the operation. */ constructor(index: number, length: number, author: number); equals(other: TextDelete): boolean; /** * Apply the current delete operation to a LogootSplit document. * @param {LogootSDocument} doc - the LogootSplit document on which the deletion wil be performed. * @return {LogootSDel} the logootsplit deletion that is related to the deletion that has been performed. */ applyTo(doc: LogootSRopes): LogootSDel; }