diff --git a/lib/phoenix_live_view.ex b/lib/phoenix_live_view.ex index 475b5f9c6..c73df18f1 100644 --- a/lib/phoenix_live_view.ex +++ b/lib/phoenix_live_view.ex @@ -1753,7 +1753,12 @@ defmodule Phoenix.LiveView do prepend items (with `at: 0`) to the stream, the non-stream item will be pushed down. """ - @spec stream(socket :: Socket.t(), name :: atom | String.t(), items :: Enumerable.t(), opts :: Keyword.t()) :: + @spec stream( + socket :: Socket.t(), + name :: atom | String.t(), + items :: Enumerable.t(), + opts :: Keyword.t() + ) :: Socket.t() def stream(%Socket{} = socket, name, items, opts \\ []) do socket @@ -1792,7 +1797,8 @@ defmodule Phoenix.LiveView do Returns an updated `socket`. """ - @spec stream_configure(socket :: Socket.t(), name :: atom | String.t(), opts :: Keyword.t()) :: Socket.t() + @spec stream_configure(socket :: Socket.t(), name :: atom | String.t(), opts :: Keyword.t()) :: + Socket.t() def stream_configure(%Socket{} = socket, name, opts) when is_list(opts) do new_socket = ensure_streams(socket) @@ -1875,7 +1881,12 @@ defmodule Phoenix.LiveView do See `stream_delete/3` for more information on deleting items. """ - @spec stream_insert(socket :: Socket.t(), name :: atom | String.t(), item :: any, opts :: Keyword.t()) :: + @spec stream_insert( + socket :: Socket.t(), + name :: atom | String.t(), + item :: any, + opts :: Keyword.t() + ) :: Socket.t() def stream_insert(%Socket{} = socket, name, item, opts \\ []) do at = Keyword.get(opts, :at, -1)