Optional Readonly[ReadonlychildrenReadonlyfinalReadonlyhistoryReadonlyregionsReadonlyvalueStaticvaluesEvery instance declared as a static member, in declaration order.
A getter so templates can read it ({{#each OrderState.values}}). TypeScript cannot give
a static getter a per-subclass type, so it is any[]; annotate where it matters
(const all: OrderState[] = OrderState.values).
Returns the primitive value of the specified object.
StaticcodecStaticmatchStaticofDeclares a member: static Pending = OrderState.of('pending'). Same instance as new, but
typed as its own member, which is what lets Enum.match track what is handled.
Staticvalue
A state is a real enum value that also carries its statechart options:
static Loading = Fetch.of('loading', { children: Attempt }), inclass Fetch extends State<Attempt>: the type param names the enums of its children and regions, som.can()andm.matches()accept their states.Each enum declares
private declare readonly brand: never. TypeScript compares classes by shape, and a private member is the one thing that tells two state enums apart.