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
I believe this is incorrect. An atom is used in examples & typespecs for the state argument(s). I also confirmed locally that using atom states does not cause any errors.
Should a typespec be added for state? Possibly something like so:
@typedoc"""A state should be a string or an atom. Whichever corresponds with the underlying state field on the given struct."""@typestate::atom|String.t()
The text was updated successfully, but these errors were encountered:
kyleboe
changed the title
transition_to spec limits state to string typetransition_to spec limits state to String type
Nov 11, 2022
In the spec definition for
transition_to
it specifiesString.t()
as thenext_state
's type.machinery/lib/machinery.ex
Line 94 in 4e7ae81
I believe this is incorrect. An
atom
is used in examples & typespecs for the state argument(s). I also confirmed locally that usingatom
states does not cause any errors.Should a typespec be added for
state
? Possibly something like so:The text was updated successfully, but these errors were encountered: