Typespecs for a module attribute

I have a module attribute from the config file:

@my_attr Application.get_env(:my_app, :foo)

How can i specify the type of the attribute? For example i want to emphasize that it is a list.

1 Like

You can’t, since elixirs module attributes do not exist in the BEAM.

1 Like

Well they ‘do’ exist on the beam if you tell it to store it there, but still no typespecs for them (well, unless you store that as a custom named typespec or so).

1 Like