mute-structs
Version:
NodeJS module providing an implementation of the LogootSplit CRDT algorithm
24 lines (23 loc) • 981 B
TypeScript
import { LogootSRopes } from "../../logootsropes";
import { TextOperation } from "../textoperation";
import { LogootSAdd } from "./logootsadd";
/**
* Represents a sequence operation (insert).
*/
export declare class TextInsert extends TextOperation {
readonly content: string;
/**
* @constructor
* @param {number} offset - the insertion position in the sequence.
* @param {string} content - the content to be inserted in the sequence.
* @param {number} author - the author of the operation.
*/
constructor(index: number, content: string, author: number);
equals(other: TextInsert): boolean;
/**
* Apply the current insert operation to a LogootSplit document.
* @param {LogootSDocument} doc - the LogootSplit document on which the insertion wil be performed.
* @return {LogootSAdd} the logootsplit insertion that is related to the insertion that has been performed.
*/
applyTo(doc: LogootSRopes): LogootSAdd;
}