The value type stored in the list.
Creates a replicated list from an optional CRList snapshot.
The value type stored in the list.
Optionalsnapshot: CRListSnapshot<T>A previously emitted CRList snapshot.
Iterates over current live values in index order.
Emits an acknowledgement frontier for currently retained deleted item ids.
Registers an event listener.
The event type to listen for.
The listener to register.
Optionaloptions: boolean | AddEventListenerOptionsListener registration options.
Inserts values after an index.
If afterIndex is omitted, values are appended at the end of the list.
Values to insert.
OptionalafterIndex: numberThe index to insert after.
Removes one or more entries starting at an index.
The first index to remove.
Number of entries to remove. Defaults to 1.
Returns the first live value matching a predicate in index order.
Predicate values are live references. Mutating them directly can mutate the list without emitting a delta.
Function to test each live value.
OptionalthisArg: unknownOptional this value for the predicate.
Calls a function once for each live value in index order.
Callback values are live references. Mutating them directly can mutate the list without emitting a delta.
Function to call for each live value.
OptionalthisArg: unknownOptional this value for the callback.
Garbage-collects deleted item ids covered by acknowledgement frontiers.
Replica acknowledgement frontiers.
Reads an item in the live list projection by index.
Returns a live value reference.
The index to read.
Applies a remote gossip delta to this list.
Emits a change event when the merge changes the live projection.
The remote CRList delta to merge.
Inserts values before an index.
If beforeIndex is omitted, values are inserted at the start of the list.
Values to insert.
OptionalbeforeIndex: numberThe index to insert before.
Removes an event listener.
The event type to stop listening for.
The listener to remove.
Optionaloptions: boolean | EventListenerOptionsListener removal options.
Overwrites entries starting at an index.
The index to start overwriting at.
Values to write.
Emits the current CRList snapshot.
Snapshot value payloads are live references. Mutating them can mutate replica state without emitting a delta.
Tests whether any live value matches a predicate in index order.
Predicate values are live references. Mutating them directly can mutate the list without emitting a delta.
Function to test each live value.
OptionalthisArg: unknownOptional this value for the predicate.
Returns a CRList snapshot of this list.
Snapshot value payloads are live references. Mutating them can mutate replica state without emitting a delta.
Called automatically by JSON.stringify.
Attempts to return this list snapshot as a JSON string.
This can fail when list values are not JSON-compatible.
A convergent replicated list.
Iteration,
find(),some(), andforEach()expose the same live value references. Mutating returned objects directly can mutate replica state without producing a CRDT delta, so callers must isolate values before out-of-band mutation. Local mutations emitdeltaandchangeevents; remote merges emitchangeevents.