Created
November 9, 2016 01:24
-
-
Save boriscy/374b819233da149ea26877b5600390c0 to your computer and use it in GitHub Desktop.
Define types on structs Elixir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Registration do | |
defstruct [:email, :password, :name, :category, :address] | |
@type t :: %RegistrationService{ | |
email: String.t, | |
password: String.t, | |
name: String.t, | |
category: String.t, | |
address: String.t | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment