Skip to main content

Function: getRevisionState()

getRevisionState(workflow, revision?): RevisionState

Defined in: packages/sdk/src/utils/revision-state.ts:47

Derive a revision's state from the workflow root pointers and (optionally) the revision in hand. Pure — no I/O, no allocation beyond the result.

When revision is omitted, per-revision facts default to false / 'draft' (there is no revision to compare), while the workflow-level derivations (draftIsLive, hasUnpublishedChanges) are still computed.

Parameters

workflow

RevisionStateWorkflow

revision?

RevisionStateRevision

Returns

RevisionState