-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
In the spec definition for transition_to
it specifies String.t()
as the next_state
's type.
Line 94 in 4e7ae81
@spec transition_to(struct, module, String.t()) :: {:ok, struct} | {:error, String.t()} |
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.
"""
@type state :: atom | String.t()
mraaroncruz
Metadata
Metadata
Assignees
Labels
No labels