You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using runUntilTransition(Actor, string, string), I should be able to use a StateValue instead of just a string. Per XState:
exportinterfaceStateValueMap{[key: string]: StateValue|undefined;}/** * The string or object representing the state value relative to the parent * state node. * * @remarks * - For a child atomic state node, this is a string, e.g., `"pending"`. * - For complex state nodes, this is an object, e.g., `{ success: * "someChildState" }`. */exporttypeStateValue=string|StateValueMap;
So while StateValueFrom<Actor['logic']> can be used to handle the above, but it appears we'd need to "flatten" that type to allow them to be specified as a "keypath"; e.g., pending | success.someChildState.
And finally the leading id in the state keypath should be optional; right now it is required as that's what's stored as the keys of the private/internal idMap. Note that the keys of idMap are only string values.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
main
branch of the repository.Overview
When using
runUntilTransition(Actor, string, string)
, I should be able to use aStateValue
instead of just astring
. Per XState:So while
StateValueFrom<Actor['logic']>
can be used to handle the above, but it appears we'd need to "flatten" that type to allow them to be specified as a "keypath"; e.g.,pending | success.someChildState
.And finally the leading
id
in the state keypath should be optional; right now it is required as that's what's stored as the keys of the private/internalidMap
. Note that the keys ofidMap
are onlystring
values.The text was updated successfully, but these errors were encountered: