esdecode
Component library

Statelet — Typed Finite State Machines for TypeScript

5.00 (1)
|1 Sales|by Northgate Type Co.|v1.0.0
Statelet — Typed Finite State Machines for TypeScript screenshot 1
1 / 2

Preview and demo

Status: unchecked. Availability checks are not a security guarantee.

1
Sales
5.0
Rating
1
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

Frequently Asked Questions

What TypeScript or Node.js version do I need to use Statelet?

Statelet is built with tsc and outputs ESM modules with full .d.ts type declarations, so you need a TypeScript project that supports ESM and a modern enough TypeScript version to benefit from the config-level type inference (TypeScript 4.7+ recommended). No specific Node.js version is enforced, but the built-in test suite uses node:test, so Node.js 18+ is recommended for running the tests locally.

Does Statelet work with React, Vue, or other frontend frameworks, and can it run in the browser?

Yes — Statelet is framework-agnostic and has zero runtime dependencies, so it works with any frontend framework (React, Vue, Svelte, etc.) or in plain browser environments. Because it builds to ESM, it integrates cleanly with modern bundlers like Vite, Rollup, and esbuild without any extra configuration.

What exactly is included in the package?

You get the Statelet source library, ESM build output with TypeScript declaration files (.d.ts), a node:test suite (no external test-framework needed), and a set of runnable real-world examples covering a fetch flow, a traffic-light, and a checkout process — all of which double as type-level correctness tests.

How does Statelet handle side effects like API calls — are actions allowed to fetch data?

Statelet intentionally keeps the core pure: the transition() function is side-effect free and actions are pure context reducers, making them trivial to unit-test. Side effects like API calls should be triggered outside the state machine in response to state changes, which you can observe via the createActor interpreter's subscribe() method.

Will invalid events or misspelled state names cause runtime errors, or are they caught earlier?

They are caught at compile time, not at runtime. Statelet infers all state names and event types directly from your config, so sending an undeclared event or targeting a non-existent state is a TypeScript compile error — bugs are surfaced before your code ever runs.

What license does Statelet use, and can I use it in commercial projects?

The product listing does not specify a license explicitly, so please check the included license file or the repository before use in a commercial project. If you have licensing questions, contact the seller directly through the marketplace before purchasing.

Technical requirements

  • See the detailed requirements in the product description below.

What is included

  • Component library package with full downloadable files
  • Product listing and product page guidance
  • Product files ready for self-hosting or integration
  • 10 listed features
  • Changelog included on the product page

Who is this product for

  • Buyers who need a component library rather than a custom build from scratch
  • Teams shopping within TypeScript
  • Use cases aligned with typescript, state machine, fsm, statechart

License and usage

  • Regular license for one end product where end users are not charged for access to the item itself
  • Extended license for one end product where end users can be charged
  • Verify the exact usage rights on the selected license before deployment or client handoff
  • Keep the purchase record and license certificate for future verification

Updates and support

  • 6 months of seller support included
  • Review the seller support scope before purchasing.
  • Recent changes are visible in the product changelog
  • Use the changelog to confirm ongoing maintenance before rollout

Technical details

Current version
1.0.0
Last updated
Jul 11, 2026
License options
Regular, Extended
Support period
6 months of seller support included

Marketplace review

Content review process

No completed marketplace review record is available for this product.

This is not a full penetration test or a guarantee that the product is vulnerability-free.

License comparison

A license is tied to one end product, not strictly to one domain. Development, staging, and the final production domain may belong to the same licensed deployment.

UseRegular LicenseExtended License
Source code modification
Own project use
One client project
One production deployment
Development and staging
Paid SaaS or paid user access
Multiple unrelated client projects
Redistribute source code
Resell source code
Read the full license terms →

License FAQ

Can I modify the source code?

Yes, under both licenses.

Can I use the script for a client?

Yes, for one client end product.

Can I install it on a staging domain?

Yes. Development and staging may belong to the licensed deployment.

Do I need another license for another client?

Yes, each unrelated client end product needs its own license.

Can I use it for a paid SaaS?

Yes, with an Extended License.

Can I resell the source code?

No. Standalone redistribution or resale is prohibited.

Is a license limited strictly to one domain?

No. It is tied to one end product, which may use development, staging, and production domains.

$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
Review scope shown below
Recent product changes listed in the changelog
6 months of seller support included

Item Details

Last Update
July 11, 2026
Published
June 9, 2026
Version
1.0.0
Category
TypeScript
Sales
1
Reviews
5.0 ★ (1)

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 →