Enumeration SignalUpdateStatusConst

the numbers used for relaying the status of a signal after it has been ran via its run method.
these numbers convey the following instructions to the context's topological update cycle Context.propagateSignalUpdate:

  • 1: this signal's value has been updated, and therefore its observers should be updated too.
  • 0: this signal's value has not changed, and therefore its observers should be not be updated. do note that an observer signal will still run if some other of its dependency signal did update this cycle (i.e. had a status value of 1)
  • -1: this signal has been aborted, and therefore its observers must abort execution as well. the observers will abort even if they had a dependency that did update (had a status value of 1)

to sum up, given a signal D, with dependencies: A, B, and C (all of which are mutually independent of each other). then the status of D will be as follows in the order of highest conditional priority to lowest:

status of D status of D as enum condition
status(D) = -1 ABORTED ∃X ∈ [A, B, C] such that status(X) === -1
status(D) = D.run() CHANGED or UNCHANGED or ABORTED ∃X ∈ [A, B, C] such that status(X) === 1
status(D) = 0 UNCHANGED ∀X ∈ [A, B, C], status(X) === 0

Enumeration Members

Enumeration Members

ABORTED: -1
UNCHANGED: 0
UPDATED: 1

Generated using TypeDoc