Skip to content

Commit

Permalink
Add type to Phoenix.HTML.FormField (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
meagharty authored Feb 11, 2025
1 parent 0a11e96 commit 1bea177
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/phoenix_html/form_field.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ defmodule Phoenix.HTML.FormField do
* `:value` - the value for the input
"""
@type t :: %__MODULE__{
id: String.t(),
name: String.t(),
errors: [term],
field: Phoenix.HTML.Form.field(),
form: Phoenix.HTML.Form.t(),
value: term
}

@enforce_keys [:id, :name, :errors, :field, :form, :value]
defstruct [:id, :name, :errors, :field, :form, :value]
end

0 comments on commit 1bea177

Please sign in to comment.