Skip to content

Instantly share code, notes, and snippets.

@boriscy
Created November 9, 2016 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boriscy/374b819233da149ea26877b5600390c0 to your computer and use it in GitHub Desktop.
Save boriscy/374b819233da149ea26877b5600390c0 to your computer and use it in GitHub Desktop.
Define types on structs Elixir
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