Skip to content

Commit

Permalink
fix typespec for Holidefs.Definition.Rule (#46)
Browse files Browse the repository at this point in the history
Observed and function keys specified as being of function type.  Code
pretty clearly returns atoms or nil.  Also added nil to type for
function_modifier, as it's optional.

Co-authored-by: Jayson Vantuyl <jayson@hmbradley.com>
  • Loading branch information
jvantuyl and Jayson Vantuyl committed Apr 2, 2024
1 parent 4f9b118 commit 96dc1e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/holidefs/definition/rule.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ defmodule Holidefs.Definition.Rule do
day: integer,
week: integer,
weekday: integer,
function: function,
function_modifier: integer,
function: atom | nil,
function_modifier: integer | nil,
regions: [String.t()],
observed: function,
observed: atom | nil,
year_ranges: map | nil,
informal?: boolean
}
Expand Down

0 comments on commit 96dc1e9

Please sign in to comment.