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/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 is_hook_rejection(hr: HookResult): boolean;
673
- 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 };
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.72.3",
3
+ "version": "5.72.4",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },