winner
winner(
leaves):Leaf|undefined
Defined in: libs/content-revision/src/lib/revision.ts:110
The winner among an entity’s leaves, per ADR-003 Decision 3. Total: live beats tombstone, then highest generation, then greatest digest. A tie at the last step would require equal digests, which by derivation means the same revision rather than two distinct ones.
Deliberately consults nothing else — not insertion order, not arrival order, not a clock. Those are exactly what differ between nodes, and a rule reading any of them picks a different winner on each, which is divergence rather than a conflict.
Parameters
Section titled “Parameters”leaves
Section titled “leaves”readonly Leaf[]
Returns
Section titled “Returns”Leaf | undefined
TypeDBLite is an independent open-source project, built on TypeDB with thanks. It is not affiliated with, sponsored by, or endorsed by TypeDB Ltd. Released under the MPL-2.0 license.