Skip to content

Commit

Permalink
Add additional specs
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Aug 16, 2024
1 parent f8d0b9b commit 2230576
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/cldr/list.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ defmodule Cldr.List do
{:ok, "Monday, Tuesday, and Wednesday"}
"""
alias Cldr.Locale

@type pattern_type :: :or | :or_narrow | :or_short | :standard | :standard_narrow |
:standard_short | :unit | :unit_narrow | :unit_short
Expand Down Expand Up @@ -245,6 +246,8 @@ defmodule Cldr.List do
}
"""
@spec list_patterns_for(Locale.locale_name(), Cldr.backend() | nil) ::
map() | {:error, {module, String.t()}}

def list_patterns_for(locale, backend \\ default_backend()) do
{locale, backend} = Cldr.locale_and_backend_from(locale, backend)
Expand All @@ -266,6 +269,8 @@ defmodule Cldr.List do
:standard_short, :unit, :unit_narrow, :unit_short]
"""
@spec list_formats_for(Locale.locale_name(), Cldr.backend() | nil) ::
[atom] | {:error, {module, String.t()}}

def list_formats_for(locale, backend \\ nil) do
{locale, backend} = Cldr.locale_and_backend_from(locale, backend)
Expand Down

0 comments on commit 2230576

Please sign in to comment.