Class TriggerSheet

Defines a collection of triggers and actions that can be executed by a block.

TriggerSheet

Hierarchy (view full)

Constructors

Properties

id: string

The unique id for this trigger sheet.

Memberof

TriggerSheet

parent: TriggerSheet

The parent TriggerSheet for this trigger sheet.

Memberof

TriggerSheet

triggers: {}

The triggers and actions for this trigger sheet.

Type declaration

    Memberof

    TriggerSheet

    written: boolean

    Methods

    • Adds a new action to the trigger sheet.

      If the trigger does not exist, it will be created.

      Parameters

      • trigger: string

        The trigger to add the action to.

      • action: BlockAction

        The action to add.

      • index: number = ...

        The index to insert the action at.

      Returns void

      Memberof

      TriggerSheet

    • Adds multiple actions to multiple triggers within the trigger sheet.

      For each trigger on triggers, the corresponding actions in actions will be added.

      Parameters

      Returns void

      Memberof

      TriggerSheet

    • Removes an action from all triggers within the trigger sheet.

      Parameters

      • comparator: Function

        The function to use to select actions.

      Returns void

      Memberof

      TriggerSheet

    • Removes a trigger from the trigger sheet.

      Parameters

      • trigger: string

      Returns void

      Memberof

      TriggerSheet

    • Removes an action from a specific trigger within the trigger sheet.

      Parameters

      • trigger: string
      • comparator: Function

        The function to use to select actions.

      Returns void

      Memberof

      TriggerSheet

    • Serializes the trigger sheet into a JSON object.

      Parameters

      • prefix: string

        The prefix to use for the string id.

      Returns any

      The serialized trigger sheet as a JSON object.

      Memberof

      TriggerSheet

    Generated using TypeDoc