@yorkie-js/sdk
    Preparing search index...

    Class Change<P>

    Change represents a unit of modification in the document.

    Type Parameters

    Index

    Constructors

    • Type Parameters

      Parameters

      • __namedParameters: {
            id: ChangeID;
            message?: string;
            operations?: Operation[];
            presenceChange?: PresenceChange<P>;
        }

      Returns Change<P>

    Methods

    • execute executes the operations of this change to the given root.

      Parameters

      • root: CRDTRoot
      • presences: Map<string, P>
      • source: OpSource

      Returns { opInfos: OpInfo[]; reverseOps: HistoryOperation<P>[] }

    • getMessage returns the message of this change.

      Returns string | undefined

    • getPresenceChange returns the presence change of this change.

      Returns PresenceChange<P> | undefined

    • hasPresenceChange returns whether this change has presence change or not.

      Returns boolean

    • toTestString returns a string containing the meta data of this change.

      Returns string

    • create creates a new instance of Change.

      Type Parameters

      Parameters

      • __namedParameters: {
            id: ChangeID;
            message?: string;
            operations?: Operation[];
            presenceChange?: PresenceChange<P>;
        }

      Returns Change<P>