# Getting the @type module attribute

**URL:** <https://forum.elixirforum.com/t/getting-the-type-module-attribute/22163>\
**Category:** Questions\
**Tags:** metaprogramming\
**Created:** [May 5, 2019, 12:28pm UTC](https://forum.elixirforum.com/t/getting-the-type-module-attribute/22163 "2019-05-05T12:28:31Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Qqwy](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/qqwy/32/1349_2.png) [@Qqwy](https://forum.elixirforum.com/u/Qqwy)\
**Post date:** [May 5, 2019, 1:32pm UTC](https://forum.elixirforum.com/t/getting-the-type-module-attribute/22163/5 "2019-05-05T13:32:13Z")

</div>

> [@tangui](#):
>
> Thanks for your answers.
> 
> @Qqwy: not sure to understand and if it’s the same use case 🙂 . Mine is mainly about documenting hundreds (if not more) configuration options including many callbacks with most of the time different signatures,

I think this part is already covered by the existing functionality. Every module that uses `defconfig` will have, for every field in the documentation, the following part in their docs:

> [@](#):
>
> Validated/parsed by calling`YourModule.load_floors/1`.

[Example here](https://hexdocs.pm/specify/Specify.Options.html#module-missing_fields_error).

> [@](#):
>
> and linking between them (config option ↔ type), and also to help dialyzer with detecting type errors.

This is indeed not something that Specify currently helps you with. It definitely would be interesting to automate the generation of a ‘config typespec’ in some way. Maybe the field types can be inferred from the parser function’s spec, and we can then define a type for the config struct as a whole. 🤔…

> [@](#):
>
> Nice lib by the way!

Thanks! 😊

---

_[View the full topic](https://forum.elixirforum.com/t/getting-the-type-module-attribute/22163)._
