manifest/locks#

Functions#

lockProblem()#

lockProblem(locked, current, timeline, parent, member, path): Problem | undefined

Defined in: manifest/locks.ts:38

Why locked cannot be set on timeline in its place (placeLock), if it cannot. current is the timeline’s own locked, absent for a value given to add: the value a timeline already has is never refused here. A set that changes nothing else is refused as every set that changes nothing is; beside a value that changes something, it is accepted.

Parameters#

locked#

boolean

current#

boolean | undefined

timeline#

Pick<Timeline, "id" | "is_segment_line">

parent#

Pick<Timeline, "id" | "is_segment_line"> | undefined

member#

boolean

path#

readonly PathSegment[]

Returns#

Problem | undefined


statedLockProblem()#

statedLockProblem(value, parent, path): Problem | undefined

Defined in: manifest/locks.ts:68

The first locked that value, a timeline given to add under parent and already accepted by the schema as a fragment, or a timeline of its subtree states against its place (lockProblem), refused at path. A timeline stating no locked takes its place’s.

Parameters#

value#

{ }

parent#

Pick<Timeline, "id" | "is_segment_line">

path#

readonly PathSegment[]

Returns#

Problem | undefined


withPlaceLocks()#

withPlaceLocks<T>(timeline, parent, member, unlockOnly?): T

Defined in: manifest/locks.ts:91

timeline under parent and its subtree, each with the lock its place decides (placeLock; member tells a group member by id); with unlockOnly, only the segments’ locks, as reading a manifest does, keeping a lock a file states elsewhere. A timeline left as it was is the same object, and every other member is kept whole.

Type Parameters#

T#

T extends object

Parameters#

timeline#

T

parent#

{ } | undefined

member#

(id) => boolean

unlockOnly?#

boolean = false

Returns#

T


withSegmentLine()#

withSegmentLine<T>(timeline, line, parent, member): T

Defined in: manifest/locks.ts:113

timeline under parent made a segment line or no longer one (line), its subtree with the locks their places decide (withPlaceLocks). A lock its place decided only because it was a segment line (one that is a child, a segment or a group member) is lifted with the flag; a lock no place decided stays.

Type Parameters#

T#

T extends object

Parameters#

timeline#

T

line#

boolean

parent#

{ } | undefined

member#

(id) => boolean

Returns#

T


withSegmentsUnlocked()#

withSegmentsUnlocked<T>(timeline): T

Defined in: manifest/locks.ts:127

A timeline’s subtree with every segment unlocked, as reading a manifest does.

Type Parameters#

T#

T extends object

Parameters#

timeline#

T

Returns#

T