Skip to main content
Version: Current

throw_if_stale

@rotorsoft/act-root


@rotorsoft/act-root / act/src / throw_if_stale

Function: throw_if_stale()

throw_if_stale(append, head): void

Defined in: libs/act/src/utils.ts:188

What every store refuses as a stale writer: an append whose expectedVersion is not the stream's head. In core so each adapter calls the one rule before it appends anything.

Parameters​

append​

expectedVersion?​

number

msgs​

readonly unknown[]

stream​

string

number

Returns​

void