🔧 Add missing typespecs

Closes #75
This commit is contained in:
Daniel Berkompas 2021-01-23 17:47:46 -08:00
commit 9e1cfd2534
2 changed files with 3 additions and 1 deletions

View file

@ -15,6 +15,8 @@ defmodule Elasticsearch.Exception do
:raw
]
@type t :: %__MODULE__{}
@enforce_keys @keys
defexception @keys

View file

@ -25,7 +25,7 @@ defmodule Elasticsearch.Index do
:ok
"""
@spec hot_swap(Cluster.t(), alias :: String.t() | atom) ::
:ok | {:error, Elasticsearch.Exception.t()}
:ok | {:error, Elasticsearch.Exception.t()} | {:error, :enoent}
def hot_swap(cluster, alias) do
alias = alias_to_atom(alias)
name = build_name(alias)