chore: fix typespecs and format

This commit is contained in:
Zach Daniel 2024-03-29 16:55:32 -04:00
parent 582b16476d
commit 8f1217ea03
2 changed files with 10 additions and 2 deletions

View file

@ -1570,11 +1570,19 @@ defmodule Ash do
end
end
@type record_or_records :: Ash.Resource.record() | [Ash.Resource.record()]
@doc """
Load fields or relationships on already fetched records. See `load/3` for more information.
"""
@spec load!(
record_or_records :: Ash.Resource.record() | [Ash.Resource.record()],
record_or_records ::
record_or_records
| {:ok, record_or_records}
| :error
| {:error, term}
| :ok
| Ash.Page.page(),
query :: load_statement(),
opts :: Keyword.t()
) ::

View file

@ -773,7 +773,7 @@ defmodule Ash.Actions.Helpers do
if Enumerable.impl_for(results) do
Enum.map(results, &select(&1, query))
else
results
results
end
end