Interface TStatebotOptions

Options for creating a Statebot.

Hierarchy

  • TStatebotOptions

Properties

The state-chart.

events?: any

If you wish to have your Statebots listen to events coming from a shared EventEmitter, you can pass it in here. The emit()/onEvent()/ performTransitions() methods will use it.

It should have the same signature as EventEmitter

  • Since v2.5.0 mitt is also compatible.
  • Since v2.6.0 mitt is used internally.
historyLimit?: number

Limit how much history the state-machine keeps. Accessed via history.

logLevel?: 0 | 2 | 1 | 3

How noisy the logging is, from 1 to 3:

1) console.warn
2) console.warn/log/table
3) console.warn/log/table/info

3 is the default. Argument type-errors will always throw.

startIn?: string

The state in which to start. If unspecified, the first state in the chart will be used.

Generated using TypeDoc