matchesExpectedVersion
API reference for matchesExpectedVersion
Function: matchesExpectedVersion()
Section titled “Function: matchesExpectedVersion()”matchesExpectedVersion<
StreamVersion>(current,expected,defaultVersion):boolean
Utility function for version matching logic
Type Parameters
Section titled “Type Parameters”StreamVersion
Section titled “StreamVersion”StreamVersion = number
Parameters
Section titled “Parameters”current
Section titled “current”undefined | StreamVersion
expected
Section titled “expected”ExpectedStreamVersion<StreamVersion>
defaultVersion
Section titled “defaultVersion”StreamVersion
Returns
Section titled “Returns”boolean