Moment class
📖 Description
The Moment
class holds a single moment within a Storyline
. A Moment
instance contains all the observable nodes that a runner should typically render.
🗃️ Fields
🏷️ count
Total number of nodes in the moment.
Type
number
🏷️ enumerators
Total number of nodes with an enumerator value. The enumerator value is used by some runners to represent a chronological question number.
Type
number
🏷️ isEvaluating
Retrieves if the moment is evaluating.
Type
boolean
🏷️ isFailed
Retrieves if the validation of the section attached to the moment failed.
Type
boolean
🏷️ isFuture
The moment is in the future.
Type
boolean
🏷️ isPassed
Retrieves if the validation of the section attached to the moment passed.
Type
boolean
🏷️ isPast
Retrieves if the moment is in the past.
Type
boolean
🏷️ isPresent
Retrieves if the moment is the present moment.
Type
boolean
🏷️ nodes
Retrieves the collection of nodes for the moment.
Type
🏷️ section
Retrieves the Section
for the moment.
Type
🏷️ tense
Retrieves the tense of the moment. It can be one of the following values:
past
: The moment is in the past;present
: The moment is the present moment;future
: The moment is in the future.
Type
"past" | "present" | "future"
▶️ Methods
🔧 restore
Restores the moment if it is not the present moment.
Signature
restore(): void