Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Define spec for structs #162

Open
fermuch opened this issue Oct 23, 2023 · 1 comment
Open

[Feature request] Define spec for structs #162

fermuch opened this issue Oct 23, 2023 · 1 comment

Comments

@fermuch
Copy link

fermuch commented Oct 23, 2023

As described in the docs there is already a mapping of field to type.

And the decode/1 function is using a generic struct.
As an example of the generated code:

@spec decode(binary) :: {:ok, struct} | {:error, any}

Would it be possible to generate a @type t for the structs?

@ahamez
Copy link
Owner

ahamez commented Oct 26, 2023

Hi 👋 Thank you for your suggestion! It's a very good idea 🤔 I'll try to take a look, but I can't make any promise 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants