R
C

MarkStore

tested

Stores formatting spans and resolves them against a character order. For each (character, mark type) the covering span with the highest op id wins, so concurrent formatting converges; a `null`/`false` value clears the mark.

Signature

ts
class MarkStore

Methods

add
ts
add(span: MarkSpan): boolean
ParameterTypeDescription
spanMarkSpan
Returnsboolean
has
ts
has(id: OpId): boolean
ParameterTypeDescription
idOpId
Returnsboolean
all
ts
all(): readonly MarkSpan[]
Returnsreadonly MarkSpan[]
resolve

Active marks for each character, given the character ids in document order. Returns one `type → value` map per index.

ts
resolve(order: readonly OpId[]): Array<Map<string, MarkValue>>
ParameterTypeDescription
orderreadonly OpId[]
ReturnsMap<string, MarkValue>[]