Skip to content

Commit

Permalink
and yet more type shenanigans
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneCypher committed May 9, 2017
1 parent 08ae3b8 commit e7f1782
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/js/jssm-types.js
Expand Up @@ -135,6 +135,7 @@ export type {
JssmStatePermitterMaybeArray,

JssmGenericMachine,
JssmGenericConfig,

JssmMachine,
JssmState,
Expand Down
10 changes: 5 additions & 5 deletions src/js/jssm.js
@@ -1,7 +1,7 @@

// @flow

import type { JssmMachine, JssmState, JssmConfig, JssmTransition, JssmTransitions, JssmTransitionList } from './jssm-types';
import type { JssmMachine, JssmState, JssmGenericConfig, JssmTransition, JssmTransitions, JssmTransitionList } from './jssm-types';

const version = null; // replaced from package.js in build

Expand All @@ -12,8 +12,8 @@ const version = null; // replaced from package.js in build
class machine<mNT, mDT> {


_state : string;
_states : Map<string, JssmState>; // todo whargarbl this really should't be string // remove mixed todo whargarbl
_state : mNT;
_states : Map<string, JssmState>; // todo whargarbl this really should't be string
_edges : Array<JssmTransition<string, mixed>>; // remove mixed todo whargarbl
_edge_map : Map<string, Map<string, number>>;
_named_transitions : Map<string, number>; // remove mixed todo whargarbl
Expand All @@ -22,7 +22,7 @@ class machine<mNT, mDT> {
_reverse_action_targets : Map<string, Map<string, mixed>>; // remove mixed todo whargarbl


constructor({ initial_state, transitions } : JssmConfig) {
constructor({ initial_state, transitions } : JssmGenericConfig<mNT, mDT>) {

this._state = initial_state;
this._states = new Map();
Expand Down Expand Up @@ -143,7 +143,7 @@ todo comeback



state() : string {
state() : mNT {
return this._state;
}

Expand Down

0 comments on commit e7f1782

Please sign in to comment.