I can specify possible values for fields in a struct and associate them with a @type t
.
But in the @spec
for my function, I have to use syntax such as:
@type t :: %MyStruct{count: integer}
@spec my_function(%MyStruct{count: 0}) :: atom
I don’t see a syntax (or I’m missing it) to do something like:
@spec my_function(MyStruct.t{count: 0}) :: atom
Is there a way to define further limited subtypes based on MyStruct?
Thanks,
Scott S.