Documentation for XFsm.
XFsm
@type action_arg() :: %{optional(:event) => event(), context: context(), self: self()}
@type callback() :: (... -> any()) | atom() | %{:method => atom(), optional(:params) => any()}
@type context() :: nil | map()
@type event() :: %{:type => atom(), optional(atom()) => any()}
@type self() :: %{pid: nil | pid(), state: nil | atom()}