Skip to content

Commit

Permalink
Generate typespec with with Arc.Ecto.Definition
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasper committed Mar 26, 2021
1 parent ca32aa5 commit f6c0df1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/arc_ecto/definition.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ defmodule Arc.Ecto.Definition do
@behaviour Ecto.Type
end

@type t() :: String.t()

def type, do: Arc.Ecto.Type.type()
def cast(value), do: Arc.Ecto.Type.cast(unquote(definition), value)
def load(value), do: Arc.Ecto.Type.load(unquote(definition), value)
Expand Down

0 comments on commit f6c0df1

Please sign in to comment.