Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

TopStateName

TopStateName<Value> = Value extends string ? Value : Extract<keyof Value, string>

The name of a top state, from a machine’s value: the key of a state with no states of its own, or the key of the state that holds them.

Type Parameter
Value