Reusing typespecs from Erlang

Hello!

I’m writing Elixir wrapper for my erlang library with lots of typespecs.
I wonder if it’s possible to reuse or alias them like this:

@type metric alias :prometheus_model.'Metric'() < - ‘Metric’ is a struct.

Well, alias is probably too much, but I’m sure I wouldn’t have to rewrite all my typespecs in Elixir, right :-)?

Thanks!

How have you actually done a struct in erlang?

But alpart from that, aliasing types is very easy: @type new_name :: old_name.