Skip to content

DataStoreTransport.writeAppendOnly method

DataStoreTransport › writeAppendOnly

Publishes an append-only document: an occupied path is rewritten only when the new list strictly extends the stored one. A reader that sees an older copy sees a prefix, so it applies fewer entries and never a different one.

Signature:

writeAppendOnly(path: string, values: readonly unknown[]): Promise<void>

Parameters:

ParameterTypeDescription
pathstringVault-relative destination within this store.
valuesreadonly unknown[]JSON-compatible entries; the stored entries must be their prefix.

Returns: Promise<void> — A promise that resolves after publication, or at once when the stored list is already identical.