Skip to content

Commit 1bea177

Browse files
authored
Add type to Phoenix.HTML.FormField (#458)
1 parent 0a11e96 commit 1bea177

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/phoenix_html/form_field.ex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ defmodule Phoenix.HTML.FormField do
1212
* `:value` - the value for the input
1313
1414
"""
15+
@type t :: %__MODULE__{
16+
id: String.t(),
17+
name: String.t(),
18+
errors: [term],
19+
field: Phoenix.HTML.Form.field(),
20+
form: Phoenix.HTML.Form.t(),
21+
value: term
22+
}
23+
1524
@enforce_keys [:id, :name, :errors, :field, :form, :value]
1625
defstruct [:id, :name, :errors, :field, :form, :value]
1726
end

0 commit comments

Comments
 (0)