esdecode.com

Statelet — Typed Finite State Machines for TypeScript

No ratings
|0 Sales|by Northgate Type Co.|v1.0.0
Statelet — Typed Finite State Machines for TypeScript screenshot 1
1 / 2
0
Sales
Rating
0
Reviews

Description

Statelet is a tiny, fully-typed finite-state-machine library for TypeScript. Define states, events, guards and actions in one typed config and get a pure transition function plus a small createActor interpreter — with state names, event types and context all inferred and checked by the compiler. Zero runtime dependencies.

Highlights

  • Real inference — invalid events and undeclared targets are compile errors.
  • Pure transition(snapshot, event) — trivial to unit-test.
  • createActor interpreter: start, send, getSnapshot, subscribe, can, stop.
  • Guards block transitions; actions are pure context reducers (exit → transition → entry).
  • Zero dependencies; builds with tsc to ESM + .d.ts.
  • node:test suite + runnable examples that double as type tests.

Features

Fully-typed: states & event types inferred from config
Invalid events / targets are compile errors
Pure transition() — side-effect free & testable
createActor interpreter with subscribe()
Guards (block) + actions (pure context updates)
entry / exit actions with deterministic ordering
Zero runtime dependencies, ~2 kB
Builds to ESM + type declarations (tsc)
node:test suite (no test-framework dependency)
Runnable examples: fetch, traffic-light, checkout

Requirements

  • TypeScript 5+
  • Node.js 18+ (for build & tests)
  • Any bundler or runtime that supports ESM

Changelog

**v1.0.0** (Latest) - Initial release - createMachine + createActor + pure transition - Guards, actions, entry/exit; node:test suite & examples
$20.00

For one end product — free to end users

Price$16.00
VAT 23%$3.68
Rounding adjustment$0.32
Total$20.00
Instant digital download
Quality reviewed by our team
Free future updates
6 months support included

Item Details

Last Update
June 9, 2026
Published
June 9, 2026
Version
1.0.0
Category
TypeScript
Sales
0
Reviews
No reviews

Share This Item

License Info

Regular License — Use in one end product which end users are not charged for.

Extended License — Use in one end product which end users can be charged for.

Verify a license key →