Function serializeActionCallArgument

  • Transforms an action call argument by returning a SerializedActionCallArgument. The following are supported out of the box:

    • Primitives.
    • Nodes that are under the same root node as the target root (when provided) will be serialized as a path.
    • Nodes that are not under the same root node as the target root will be serialized as their snapshot.
    • Arrays (observable or not).
    • Dates.
    • Maps (observable or not).
    • Sets (observable or not).
    • Plain objects (observable or not).

    If the value cannot be serialized it will throw an exception.

    Parameters

    • argValue: any

      Argument value to be transformed into its serializable form.

    • Optional targetRoot: object

      Target root node of the model where this action is being performed.

    Returns SerializedActionCallArgument | JSONPrimitiveValue

    The serializable form of the passed value.