@bemedev/app-ts
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@bemedev/app-ts

A TypeScript library for creating and managing state machines.


Installation

npm install @bemedev/app-ts
# or
yarn add @bemedev/app-ts

Features

  • Typed state machine creation
  • Public and private context management
  • Support for actions, guards and delays
  • Transition and event handling
  • Support for nested machines

Usage

import { createMachine } from '@bemedev/app-ts';

const machine = createMachine({
  initial: 'idle',
  states: {
    idle: {
      on: {
        START: 'running',
      },
    },
    running: {
      on: {
        STOP: 'idle',
      },
    },
  },
});

CHANGE_LOG

View changelog

[0.1.0] - Waiting for better coverage


Contributing

Contributions are welcome! Please read our contribution guide for details.


License

MIT


Auteur

chlbri (bri_lvi@icloud.com)

My github


Liens

Package Sidebar

Install

npm i @bemedev/app-ts

Weekly Downloads

14

Version

0.0.1

License

MIT

Unpacked Size

836 kB

Total Files

557

Last publish

Collaborators

  • bemedev