ChangeMap

change map for change events in the form of action : change

interface ChangeMap {
  counterUpdate: { key: string; value: number };
  delete: { path: string | number[] };
  insert: {
    concurrent?: any;
    hasConcurrent: boolean;
    index: number;
    path: string | number[];
    value: any;
  };
  textDelete: { fragments: { index: number; length: number }[]; key: string };
  textInsert: { index: number; key: string; value: string };
  update: {
    concurrent?: any;
    hasConcurrent: boolean;
    path: string | number[];
    value: any;
  };
}

index

Properties

counterUpdate

counter updated either by incrementing or decrementing

{ key: string; value: number;  }

delete

delete value at path

{ path: string | number[];  }

insert

insert value: useful for arrays to differentiate between an update and an insater

{ concurrent?: any; hasConcurrent: boolean; index: number; path: string | number[]; value: any;  }

textDelete

text deleted

{ fragments: { index: number; length: number;  }[]; key: string;  }

textInsert

text inserted

{ index: number; key: string; value: string;  }

update

updated tree

{ concurrent?: any; hasConcurrent: boolean; path: string | number[]; value: any;  }