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
|
|
@ -145,7 +145,10 @@ defmodule MvWeb.LiveHelpers do
|
|||
end
|
||||
"""
|
||||
@spec submit_form(AshPhoenix.Form.t(), map(), Mv.Accounts.User.t() | nil) ::
|
||||
{:ok, Ash.Resource.t()} | {:error, AshPhoenix.Form.t()}
|
||||
{:ok, Ash.Resource.record() | nil | [Ash.Notifier.Notification.t()]}
|
||||
| {:ok, Ash.Resource.record(), [Ash.Notifier.Notification.t()]}
|
||||
| :ok
|
||||
| {:error, AshPhoenix.Form.t()}
|
||||
def submit_form(form, params, actor) do
|
||||
AshPhoenix.Form.submit(form, params: params, action_opts: ash_actor_opts(actor))
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue