Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Action<T, S, A>

Type parameters

  • T

    Reprents the given state of an application as defined in initProvenance.

  • S

    Reprents the given event types in your application. Event types are used to differentiate between different actions that create nodes.

  • A

    Reprents the given "extra" type for storing metadata. Extra is a way to store customized metadata.

Hierarchy

  • Action

Index

Constructors

constructor

Properties

action

action: ActionFunction<T>

Optional args

args: any[]

artifacts

artifacts: Artifacts<A>

Optional complex

complex: undefined | false | true

Optional ephemeral

ephemeral: undefined | false | true

Optional eventType

eventType: S

label

label: string

metadata

metadata: NodeMetadata<S>

prov

prov: Provenance<T, S, A>

Methods

addAction

  • Edits the action function associated with this function. The action function is the function that changes the state of the new node. See Provenance.ts for more documentation on the ActionFunction type.

    Parameters

    Returns Action<T, S, A>

addArgs

  • addArgs(args: any[]): Action<T, S, A>

addArtifacts

  • Changes the Artifacts object associated with this action. See Provenance.ts for more documentation on the Artifacts type.

    Parameters

    Returns Action<T, S, A>

addEventType

  • addEventType(eventType: S): Action<T, S, A>
  • Changes the event type within the NodeMetadata object associated with this action See Provenance.ts for more documentation on the NodeMetadata type.

    Parameters

    • eventType: S

    Returns Action<T, S, A>

addExtra

  • addExtra(extra: A): this

addLabel

  • addLabel(label: string): Action<T, S, A>

addMetadata

alwaysStoreState

  • alwaysStoreState(b: boolean): Action<T, S, A>
  • Tells provenance whether or not you want to store the entire state of the application on this node, or if you would like to store a diff from the last state node. If true, the entire state will always be stored. If false, the entire state will only be stored when deemed necessary based on the difference from the previos state.

    There is no difference in how you interact with this node. False by default.

    Parameters

    • b: boolean

    Returns Action<T, S, A>

applyAction

  • applyAction(): void
  • Applies this action the provenance graph. Results in a node being created and set as the current node.

    Returns void

isEphemeral

  • isEphemeral(b: boolean): Action<T, S, A>
  • Tells provenance whether or not you want to store the entire state of the application on this node, or if you would like to store a diff from the last state node. If true, the entire state will always be stored. If false, the entire state will only be stored when deemed necessary based on the difference from the previos state.

    There is no difference in how you interact with this node. False by default.

    Parameters

    • b: boolean

    Returns Action<T, S, A>

Generated using TypeDoc