Type alias UpgradeContext<OldContext, NewContext>

UpgradeContext<OldContext, NewContext>: ((oldStates, newStates, context) => NewContext)

Type Parameters

  • OldContext = object

  • NewContext = object

Type declaration

    • (oldStates, newStates, context): NewContext
    • upgradeContext is called to migrate the context of an instance of a previous version of a machine to the context of the new version of the machine.

      upgradeContext receives an array of StatePaths representing all states that the old machine was in (potentially >1 if the old machine had parallel states) and an array of StatePaths representing the mapping of those states into new machine version states by upgradeState.

      To use your own context shapes, use UpgradeContext<OldContext, NewContext>.


      Returns NewContext

Generated using TypeDoc