commands/set#

Type Aliases#

Setter#

Setter<T> = (view, target, value, path, changes) => View | CommandError

Defined in: commands/set.ts:122

Set one property of target to value: the new view, or the refusal at path ([address, property]). A setter that changes something records path in changes.

Type Parameters#

T#

T extends Target

Parameters#

view#

View

target#

T

value#

unknown

path#

readonly PathSegment[]

changes#

ChangeSet

Returns#

View | CommandError

Variables#

BLOCK_PROPERTIES#

const BLOCK_PROPERTIES: readonly string[]

Defined in: commands/set.ts:441

The names of a block’s own members a set may give, in the order a new block’s are applied; name, statements and provenance are its manifest’s.


SETTABLE#

const SETTABLE: { readonly [kind in TargetKind]: Setters<TargetOfKind[kind]> }

Defined in: commands/set.ts:1271

What a set may give each kind of target, by property.

Functions#

changeProblem()#

changeProblem(view, change): Problem | undefined

Defined in: commands/set.ts:1155

Why one change of a set, its values all set, leaves its target refused, if it does: an elision whose end does not lie after its start (stretchProblem), at the change’s end where it gives one, else at its start. Checked once per change, so that one change may move both ends of an elision past the other’s old value.

Parameters#

view#

View

change#

Change

Returns#

Problem | undefined


readBlockManifest()#

readBlockManifest(value, id, mint): Problem | Manifest

Defined in: commands/set.ts:224

A whole manifest for block id, its segment lines covered (withSegmentLinesCovered, each new segment’s ID given by mint) and the tree of every line covered given the locks its places decide (withPlaceLocks), as set is_segment_line gives them; its problems located below [id, "manifest"].

Parameters#

value#

unknown

id#

string

mint#

Mint

Returns#

Problem | Manifest


setProperty()#

setProperty(view, address, property, value, changes): View | Problem

Defined in: commands/set.ts:1338

Set property of the target at address to value, recording the change in changes.

Parameters#

view#

View

address#

Address

property#

string

value#

unknown

changes#

ChangeSet

Returns#

View | Problem