Skip to content

Commit

Permalink
feat: provide types
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Feb 12, 2024
1 parent baa029f commit a27f8fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/statetransition-mixin.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const TRANSITION_PROMISE = Symbol("transitionPromise");
/**
* @typedef {Object} Transition
* @property {number} timeout in milliseconds the transtion is allowed to take
* @property {string} name
* @property {Transition} initial to begin with
* @property {Transition} during while we are trying to reach the target
* @property {Transition} target
Expand Down Expand Up @@ -97,7 +98,7 @@ export function prepareActions(as) {

/**
* Extends a class to support state transtions.
* @param {Class} superclass
* @param {new() => superclass} superclass
* @param {Action[]} actions
* @param {string} initialState starting state
*/
Expand Down Expand Up @@ -159,7 +160,7 @@ export function StateTransitionMixin(superclass, actions, initialState) {
* @param {string} newState new state
* @return {void}
*/
stateChanged() {}
stateChanged(origin,oldState,newState) {}

/**
* Delivers current state
Expand Down

0 comments on commit a27f8fa

Please sign in to comment.