Skip to content

Mantaq

State machines made simple.

State machine library for TypeScript. You declare states and events; Mantaq runs transitions, effects, timeouts, child actors, and cleanup. All types inferred from declarations.

Tiny API

Three things: state, event, Actor. Learn them, build anything.

Fully Typed

Events, states, context, all inferred. No manual type annotations.

Testable

VirtualClock makes time deterministic. No fake timer hacks.

Hierarchical

Regions, composition, final states. Complex patterns, simple API.