Skip to content

RecordTouch

type RecordTouch = {
affected?: string[];
blockId: string;
from?: number;
scope: "text" | "marks" | "props" | "children";
to?: number;
};

Defined in: ledger-conflict.ts:34

One region of the document a record touches, keyed by block id.

  • text — a character range [from, to) of a block’s inline content was replaced.
  • marks — a character range [from, to) of a block had a mark toggled.
  • props — a block’s type/attrs changed.
  • children — a parent’s child list changed (insert/remove/move/split/join). affected lists ids that left/entered that parent, so an edit to a block another record deleted or moved is detectable as a conflict.
PropertyTypeDefined in
affected?string[]ledger-conflict.ts:39
blockIdstringledger-conflict.ts:35
from?numberledger-conflict.ts:37
scope"text" | "marks" | "props" | "children"ledger-conflict.ts:36
to?numberledger-conflict.ts:38