How to annotate generic action returning records

If I have a generic action on a resource that returns a single record of that resource, how do I annotate the return type of the action? __MODULE__ is not recognized so for now I'm using :struct but I don't think that's completely right.
1 Reply
jonas_h
jonas_h4mo ago
I think you should add a constraint as well like so:
constraints instance_of: __MODULE__
constraints instance_of: __MODULE__

Did you find this page helpful?