       :closed
 
   """
-  @spec command(GenServer.server(), command, Keyword.t()) ::
+  @spec command(connection(), command(), keyword()) ::
           :ok
           | {:ok, Redix.Protocol.redis_value()}
-          | {:error, atom | Redix.Error.t() | Redix.ConnectionError.t()}
+          | {:error, atom() | Redix.Error.t() | Redix.ConnectionError.t()}
   def command(conn, command, opts \\ []) do
     case pipeline(conn, [command], opts) do
       {:ok, [%Redix.Error{} = error]} -> raise(error)

      ** (Redix.ConnectionError) :closed

  """
  @spec pipeline!(GenServer.server(), [command], Keyword.t()) ::
          [Redix.Protocol.redis_value()] | no_return
  def pipeline!(conn, commands, opts \\ []) do
    case pipeline(conn, commands, opts) do
      {:ok, response} -> response

      :ok

  """
  @spec stop(connection(), timeout()) :: :ok
  def stop(conn, timeout \\ :infinity) do
    Redix.Connection.stop(conn, timeout)
  end
