Skip to content

TypeScript API / laikacms/storage / LocksSupportEnabled

Variable: LocksSupportEnabled ​

ts
const LocksSupportEnabled: Struct<{
  description: String;
  scope: Literals<readonly ["in-process", "shared"]>;
  supported: Literal<true>;
  transactional: Boolean;
}>;

Advertises the locking surface of a repository. Never a bare boolean, because two things a caller must not guess at are independently true or false:

  • scope: in-process locks live in one node's memory, which is correct for single-node deployments and tests but silently wrong across nodes. shared locks are cross-node correct. Advertised so a multi-node operator sees single-node-only locking here rather than discovering it in production.
  • transactional: whether withDocumentLock rolls back partial writes (true) or merely brackets a lock around them (false). A caller needing atomic multi-write checks this and degrades or refuses on a bracket-only backend.

Both axes exist from the first commit so that adding them later would not be a breaking capability change.

Released under the MIT License.