refactor(types): reconcile @specs with their success typings

This commit is contained in:
Moritz 2026-06-02 11:25:03 +02:00
parent 263857ee26
commit fd8e6ac178
17 changed files with 92 additions and 38 deletions

View file

@ -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