Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

twine / StateConfig

Interface: StateConfig โ€‹

Defined in: twine/src/state-machine.ts:13

One state's hooks, all optional.

Properties โ€‹

onEnter? โ€‹

optional onEnter?: StateBody

Defined in: twine/src/state-machine.ts:15

Runs once when the machine enters this state (and at load for the initial state).


onExit? โ€‹

optional onExit?: StateBody

Defined in: twine/src/state-machine.ts:19

Runs once as the machine leaves this state.


onTick? โ€‹

optional onTick?: StateBody

Defined in: twine/src/state-machine.ts:17

Runs every dispatch while in this state (gate the dispatch call for throttling).

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.