I would like to be able to do the following in my typespec: ``` @spec to_struct("account_created") :: %AccountCreated{} @spec to_struct("account_closed") :: %AccountClosed{} @spec to_struct(String.t()) :: no_return()
@spec to_string(%AccountCreated{}) :: "account_created" @spec to_string(%AccountClosed{}) :: "account_closed" @spec to_string(struct()) :: no_return() ``` This will help the documentation much better, while also keeping the typespec closer to what the intention was. -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/147aa05a-be3d-4f32-aab8-13a1938341b0n%40googlegroups.com.