commands/apply#

Interfaces#

Applied#

Defined in: commands/apply.ts:31

A command applied: the view it leaves and what it changed, the IDs it took in changes.ids.

Properties#

changes#

readonly changes: ChangeSet

Defined in: commands/apply.ts:33

view#

readonly view: View

Defined in: commands/apply.ts:32

Functions#

apply()#

apply(view, command, minter?): View | Problem

Defined in: commands/apply.ts:177

Apply one command to a view: the new view, or why the command was refused. The IDs of what it creates are its ids; with minter, those past them are minted by it, as the store mints them for a command it dispatches. Without a minter, a command creating an element its ids gives no ID for is refused, as a journal entry lacking one is.

Parameters#

view#

View

command#

unknown

minter?#

IdMinter | null = null

Returns#

View | Problem


applyChanges()#

applyChanges(view, command, checked?, minter?): Problem | Applied

Defined in: commands/apply.ts:95

Apply a command parseCommand accepted and settle what it changed. With checked, the settled manifests are checked against the schema and the invariants and a set that changes nothing is refused; without, as a gesture’s preview applies it, neither. Every element it creates takes the next of the command’s ids, then, past them, the next ID minter mints; without a minter a command creating more elements than its ids lists is refused (invalid_command at ["ids"]), and, checked, so is one whose ids lists more IDs than it creates (at ["ids", <first one left>]).

Parameters#

view#

View

command#

Command

checked?#

boolean = true

minter?#

IdMinter | null = null

Returns#

Problem | Applied


applyParsed()#

applyParsed(view, command, minter?): View | Problem

Defined in: commands/apply.ts:161

Apply a command parseCommand accepted, the IDs it creates taken from its ids, then from minter.

Parameters#

view#

View

command#

Command

minter?#

IdMinter | null = null

Returns#

View | Problem

References#

embedRule#

Re-exports embedRule