Skip to content

Commit

Permalink
chore: add type for :ok | {:error, ErrorMessage.t}
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaAK committed Sep 28, 2023
1 parent 387cda8 commit f857f82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.3.2
- Add `t_ok_res` type for `:ok | {:error, ErrorMessage.t}`

## 0.3.1
- Add ability to serialize non local pids as well

Expand Down
3 changes: 3 additions & 0 deletions lib/error_message.ex
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ defmodule ErrorMessage do
@type t_res(result_type) :: {:ok, result_type} | {:error, t}
@type t_res(result_type, details_type) :: {:ok, result_type} | {:error, t(details_type)}

@type t_ok_res :: :ok | {:error, t}
@type t_ok_res(details_type) :: :ok | {:error, t(details_type)}

@http_error_codes ~w(
multiple_choices
moved_permanently
Expand Down

0 comments on commit f857f82

Please sign in to comment.