diff --git a/.dialyzer_ignore_warnings b/.dialyzer_ignore_warnings new file mode 100644 index 0000000..1beb3b1 --- /dev/null +++ b/.dialyzer_ignore_warnings @@ -0,0 +1,2 @@ +:0: Unknown function persistent_term:get/2 +:0: Unknown function persistent_term:put/2 diff --git a/lib/cldr/backend/relative.ex b/lib/cldr/backend/relative.ex index 56dcda1..ae4b980 100644 --- a/lib/cldr/backend/relative.ex +++ b/lib/cldr/backend/relative.ex @@ -127,7 +127,7 @@ defmodule Cldr.DateTime.Relative.Backend do """ - @spec to_string(integer | float | Date.t() | DateTime.t(), Keyword.t()) :: + @spec to_string(number | map(), Keyword.t()) :: {:ok, String.t()} | {:error, {module, String.t()}} def to_string(time, options \\ []) do @@ -164,7 +164,7 @@ defmodule Cldr.DateTime.Relative.Backend do See `to_string/2` """ - @spec to_string!(number, Keyword.t()) :: String.t() + @spec to_string!(number | map(), Keyword.t()) :: String.t() def to_string!(time, options \\ []) do Cldr.DateTime.Relative.to_string!(time, unquote(backend), options) end diff --git a/mix.exs b/mix.exs index 970edf1..cf4c357 100644 --- a/mix.exs +++ b/mix.exs @@ -16,7 +16,10 @@ defmodule CldrDatesTimes.Mixfile do start_permanent: Mix.env() == :prod, deps: deps(), compilers: Mix.compilers(), - elixirc_paths: elixirc_paths(Mix.env()) + elixirc_paths: elixirc_paths(Mix.env()), + dialyzer: [ + ignore_warnings: ".dialyzer_ignore_warnings" + ] ] end