refactor(types): reconcile @specs with their success typings
This commit is contained in:
parent
263857ee26
commit
fd8e6ac178
17 changed files with 92 additions and 38 deletions
|
|
@ -12,7 +12,9 @@ defmodule MvWeb.Translations.FieldTypes do
|
|||
"""
|
||||
use Gettext, backend: MvWeb.Gettext
|
||||
|
||||
@spec label(atom()) :: String.t()
|
||||
@type field_type :: :string | :integer | :boolean | :date | :email
|
||||
|
||||
@spec label(field_type()) :: String.t()
|
||||
def label(:string), do: gettext("Text")
|
||||
def label(:integer), do: gettext("Number")
|
||||
def label(:boolean), do: gettext("Yes/No-Selection")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue