UNPKG

fsm-as-promised

Version:

A minimalistic finite state machine library using promises

18 lines (17 loc) 465 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FsmError = void 0; class FsmError extends Error { constructor(message, { name, from, instanceId, pending }) { super(message); this.trigger = name; this.current = from; if (instanceId) { this.instanceId = instanceId; } if (pending) { this.pending = pending; } } } exports.FsmError = FsmError;