Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #398 from StoneCypher/InvertRollupAndTypescript
Invert rollup and typescript
- Loading branch information
Showing
37 changed files
with
43,605 additions
and
27,869 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"exclude": [ | ||
"src/js/jssm-dot.js" | ||
"src/js/jssm-dot.js", | ||
"build/**/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
declare function peg$SyntaxError(message: any, expected: any, found: any, location: any): void; | ||
declare namespace peg$SyntaxError { | ||
var buildMessage: (expected: any, found: any) => string; | ||
} | ||
declare function peg$parse(input: any, options: any): any; | ||
export { peg$SyntaxError as SyntaxError, peg$parse as parse }; |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
declare type StateType = string; | ||
import { JssmGenericState, JssmGenericConfig, JssmTransition, JssmTransitionList, JssmMachineInternalState, JssmParseTree, JssmStateDeclaration, JssmArrow, JssmArrowDirection, JssmArrowKind, JssmLayout, FslDirection, FslTheme } from './jssm_types'; | ||
import { seq, weighted_rand_select, weighted_sample_select, histograph, weighted_histo_key } from './jssm_util'; | ||
import { parse } from './jssm-dot'; | ||
import { version } from './version'; | ||
declare function arrow_direction(arrow: JssmArrow): JssmArrowDirection; | ||
declare function arrow_left_kind(arrow: JssmArrow): JssmArrowKind; | ||
declare function arrow_right_kind(arrow: JssmArrow): JssmArrowKind; | ||
declare function compile<mDT>(tree: JssmParseTree): JssmGenericConfig<mDT>; | ||
declare function make<mDT>(plan: string): JssmGenericConfig<mDT>; | ||
declare function transfer_state_properties(state_decl: JssmStateDeclaration): JssmStateDeclaration; | ||
declare class Machine<mDT> { | ||
_state: StateType; | ||
_states: Map<StateType, JssmGenericState>; | ||
_edges: Array<JssmTransition<mDT>>; | ||
_edge_map: Map<StateType, Map<StateType, number>>; | ||
_named_transitions: Map<StateType, number>; | ||
_actions: Map<StateType, Map<StateType, number>>; | ||
_reverse_actions: Map<StateType, Map<StateType, number>>; | ||
_reverse_action_targets: Map<StateType, Map<StateType, number>>; | ||
_machine_author?: Array<string>; | ||
_machine_comment?: string; | ||
_machine_contributor?: Array<string>; | ||
_machine_definition?: string; | ||
_machine_language?: string; | ||
_machine_license?: string; | ||
_machine_name?: string; | ||
_machine_version?: string; | ||
_fsl_version?: string; | ||
_raw_state_declaration?: Array<Object>; | ||
_state_declarations: Map<StateType, JssmStateDeclaration>; | ||
_graph_layout: JssmLayout; | ||
_dot_preamble: string; | ||
_arrange_declaration: Array<Array<StateType>>; | ||
_arrange_start_declaration: Array<Array<StateType>>; | ||
_arrange_end_declaration: Array<Array<StateType>>; | ||
_theme: FslTheme; | ||
_flow: FslDirection; | ||
constructor({ start_states, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, state_declaration, fsl_version, dot_preamble, arrange_declaration, arrange_start_declaration, arrange_end_declaration, theme, flow, graph_layout }: JssmGenericConfig<mDT>); | ||
_new_state(state_config: JssmGenericState): StateType; | ||
state(): StateType; | ||
state_is_final(whichState: StateType): boolean; | ||
is_final(): boolean; | ||
graph_layout(): string; | ||
dot_preamble(): string; | ||
machine_author(): Array<string>; | ||
machine_comment(): string; | ||
machine_contributor(): Array<string>; | ||
machine_definition(): string; | ||
machine_language(): string; | ||
machine_license(): string; | ||
machine_name(): string; | ||
machine_version(): string; | ||
raw_state_declarations(): Array<Object>; | ||
state_declaration(which: StateType): JssmStateDeclaration; | ||
state_declarations(): Map<StateType, Object>; | ||
fsl_version(): string; | ||
machine_state(): JssmMachineInternalState<mDT>; | ||
states(): Array<StateType>; | ||
state_for(whichState: StateType): JssmGenericState; | ||
has_state(whichState: StateType): boolean; | ||
list_edges(): Array<JssmTransition<mDT>>; | ||
list_named_transitions(): Map<StateType, number>; | ||
list_actions(): Array<StateType>; | ||
theme(): FslTheme; | ||
flow(): FslDirection; | ||
get_transition_by_state_names(from: StateType, to: StateType): number; | ||
lookup_transition_for(from: StateType, to: StateType): JssmTransition<mDT>; | ||
list_transitions(whichState?: StateType): JssmTransitionList; | ||
list_entrances(whichState?: StateType): Array<StateType>; | ||
list_exits(whichState?: StateType): Array<StateType>; | ||
probable_exits_for(whichState: StateType): Array<JssmTransition<mDT>>; | ||
probabilistic_transition(): boolean; | ||
probabilistic_walk(n: number): Array<StateType>; | ||
probabilistic_histo_walk(n: number): Map<StateType, number>; | ||
actions(whichState?: StateType): Array<StateType>; | ||
list_states_having_action(whichState: StateType): Array<StateType>; | ||
list_exit_actions(whichState?: StateType): Array<StateType>; | ||
probable_action_exits(whichState?: StateType): Array<any>; | ||
is_unenterable(whichState: StateType): boolean; | ||
has_unenterables(): boolean; | ||
is_terminal(): boolean; | ||
state_is_terminal(whichState: StateType): boolean; | ||
has_terminals(): boolean; | ||
is_complete(): boolean; | ||
state_is_complete(whichState: StateType): boolean; | ||
has_completes(): boolean; | ||
action(name: StateType, newData?: mDT): boolean; | ||
transition(newState: StateType, newData?: mDT): boolean; | ||
force_transition(newState: StateType, newData?: mDT): boolean; | ||
current_action_for(action: StateType): number; | ||
current_action_edge_for(action: StateType): JssmTransition<mDT>; | ||
valid_action(action: StateType, _newData?: mDT): boolean; | ||
valid_transition(newState: StateType, _newData?: mDT): boolean; | ||
valid_force_transition(newState: StateType, _newData?: mDT): boolean; | ||
sm(template_strings: Array<string>, ...remainder: any[]): Machine<mDT>; | ||
} | ||
declare function sm<mDT>(template_strings: Array<string>, ...remainder: any[]): Machine<mDT>; | ||
export { version, transfer_state_properties, Machine, make, parse, compile, sm, arrow_direction, arrow_left_kind, arrow_right_kind, seq, weighted_rand_select, histograph, weighted_sample_select, weighted_histo_key }; |
Oops, something went wrong.