Skip to content

Commit

Permalink
Update type declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
gordalina committed Jul 30, 2020
1 parent 3f1542f commit 1deb81a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/hush/resolver.ex
Expand Up @@ -20,7 +20,7 @@ defmodule Hush.Resolver do
@doc """
Substitute {:hush, Hush.Provider, "key", [options]} present in the the config argument
"""
@spec resolve!(Keyword.t()) :: Keyword.t()
@spec resolve!(Keyword.t() | map) :: Keyword.t()
def resolve!(config) do
Enum.reduce(config, [], fn
{key, {:hush, provider, name}}, acc ->
Expand All @@ -30,10 +30,10 @@ defmodule Hush.Resolver do
acc ++ [{key, resolve_value!(key, provider, name, options)}]

{key, rest = [_ | _]}, acc ->
acc ++ [{key, resolve!(rest)}]
acc ++ [{key, rest |> resolve!()}]

{key, rest = %{}}, acc ->
acc ++ [{key, resolve!(rest) |> Map.new()}]
acc ++ [{key, rest |> resolve!() |> Map.new()}]

other, acc ->
acc ++ [other]
Expand Down

0 comments on commit 1deb81a

Please sign in to comment.