jssm 5.79.0 → 5.79.3

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
@@ -253,6 +253,7 @@ declare class Machine<mDT> {
253
253
  _property_keys: Set<string>;
254
254
  _default_properties: Map<string, any>;
255
255
  _state_properties: Map<string, any>;
256
+ _required_properties: Set<string>;
256
257
  _history: JssmHistory<mDT>;
257
258
  _history_length: number;
258
259
  constructor({ start_states, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, state_declaration, property_definition, state_property, fsl_version, dot_preamble, arrange_declaration, arrange_start_declaration, arrange_end_declaration, theme, flow, graph_layout, instance_name, history, data }: JssmGenericConfig<mDT>);
@@ -312,6 +313,23 @@ declare class Machine<mDT> {
312
313
  *
313
314
  */
314
315
  prop(name: string): any;
316
+ /*********
317
+ *
318
+ * Get the current value of a given property name. If missing on the state
319
+ * and without a global default, throw, unlike {@link prop}, which would
320
+ * return `undefined` instead.
321
+ *
322
+ * ```typescript
323
+ *
324
+ * ```
325
+ *
326
+ * @param name The relevant property name to look up
327
+ *
328
+ * @returns The value behind the prop name. Because functional props are
329
+ * evaluated as getters, this can be anything.
330
+ *
331
+ */
332
+ strict_prop(name: string): any;
315
333
  /*********
316
334
  *
317
335
  * Get the current value of every prop, as an object. If no current definition
package/jssm_types.d.ts CHANGED
@@ -38,6 +38,7 @@ declare type JssmSerialization<DataType> = {
38
38
  declare type JssmPropertyDefinition = {
39
39
  name: string;
40
40
  default_value?: any;
41
+ required?: boolean;
41
42
  };
42
43
  declare type JssmTransitionPermitter<DataType> = (OldState: StateType, NewState: StateType, OldData: DataType, NewData: DataType) => boolean;
43
44
  declare type JssmTransitionPermitterMaybeArray<DataType> = JssmTransitionPermitter<DataType> | Array<JssmTransitionPermitter<DataType>>;
@@ -173,6 +174,7 @@ declare type JssmCompileSeStart<DataType> = {
173
174
  name?: string;
174
175
  state?: string;
175
176
  default_value?: any;
177
+ required?: boolean;
176
178
  };
177
179
  declare type JssmParseTree = Array<JssmCompileSeStart<StateType>>;
178
180
  declare type JssmParseFunctionType = (string: any) => JssmParseTree;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.79.0",
3
+ "version": "5.79.3",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },