Skip to content

assertDraftReadable

assertDraftReadable(props): void

Defined in: packages/core/src/db/staleWrite.ts:97

Rejects a draft write or publish by a caller who may not read the document’s existing draft row — they would overwrite or promote changes they cannot see.

Omit<StaleWriteReadCheckProps, "readAction">

The write’s config, access options and caller, and the draft row’s user fields.

void

{ code: "DRAFT_NOT_READABLE", message }.