jssm 5.72.3 → 5.72.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -37
- package/dist/es6/jssm.d.ts +5 -3
- package/dist/es6/jssm.js +43 -17
- package/dist/es6/jssm_types.d.ts +2 -2
- package/dist/es6/version.js +1 -1
- package/dist/jssm.es5.cjs.js +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/jssm.d.ts +5 -3
- package/jssm_types.d.ts +2 -2
- package/package.json +1 -1
package/jssm.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare type StateType = string;
|
|
2
2
|
import { JssmGenericState, JssmGenericConfig, JssmTransition, JssmTransitionList, // JssmTransitionRule,
|
|
3
|
-
JssmMachineInternalState, JssmParseTree, JssmStateDeclaration, JssmArrow, JssmArrowDirection, JssmArrowKind, JssmLayout, FslDirection, FslTheme, HookDescription, HookHandler, HookResult } from './jssm_types';
|
|
3
|
+
JssmMachineInternalState, JssmParseTree, JssmStateDeclaration, JssmArrow, JssmArrowDirection, JssmArrowKind, JssmLayout, FslDirection, FslTheme, HookDescription, HookHandler, HookContext, HookResult, HookComplexResult } from './jssm_types';
|
|
4
4
|
import { seq, weighted_rand_select, weighted_sample_select, histograph, weighted_histo_key } from './jssm_util';
|
|
5
5
|
import { shapes, gviz_shapes, named_colors } from './jssm_constants';
|
|
6
6
|
import { version } from './version';
|
|
@@ -669,5 +669,7 @@ declare function sm<mDT>(template_strings: TemplateStringsArray, ...remainder: a
|
|
|
669
669
|
*
|
|
670
670
|
*/
|
|
671
671
|
declare function from<mDT>(MachineAsString: string, ExtraConstructorFields?: Partial<JssmGenericConfig<mDT>> | undefined): Machine<mDT>;
|
|
672
|
-
declare function
|
|
673
|
-
|
|
672
|
+
declare function is_hook_complex_result<mDT>(hr: unknown): hr is HookComplexResult<mDT>;
|
|
673
|
+
declare function is_hook_rejection<mDT>(hr: HookResult<mDT>): boolean;
|
|
674
|
+
declare function abstract_hook_step<mDT>(maybe_hook: HookHandler<mDT> | undefined, hook_args: HookContext<mDT>): HookComplexResult<mDT>;
|
|
675
|
+
export { version, transfer_state_properties, Machine, make, wrap_parse as parse, compile, sm, from, arrow_direction, arrow_left_kind, arrow_right_kind, seq, weighted_rand_select, histograph, weighted_sample_select, weighted_histo_key, shapes, gviz_shapes, named_colors, is_hook_rejection, is_hook_complex_result, abstract_hook_step };
|
package/jssm_types.d.ts
CHANGED
|
@@ -203,11 +203,11 @@ declare type HookComplexResult<mDT> = {
|
|
|
203
203
|
state?: StateType;
|
|
204
204
|
data?: mDT;
|
|
205
205
|
};
|
|
206
|
-
declare type HookResult = true | false | undefined | void
|
|
206
|
+
declare type HookResult<mDT> = true | false | undefined | void | HookComplexResult<mDT>;
|
|
207
207
|
declare type HookContext<mDT> = {
|
|
208
208
|
data: mDT;
|
|
209
209
|
};
|
|
210
|
-
declare type HookHandler<mDT> = (hook_context: HookContext<mDT>) => HookResult
|
|
210
|
+
declare type HookHandler<mDT> = (hook_context: HookContext<mDT>) => HookResult<mDT>;
|
|
211
211
|
declare type JssmErrorExtendedInfo = {
|
|
212
212
|
requested_state?: StateType | undefined;
|
|
213
213
|
};
|