Code:
@type t :: %__MODULE__{
..fields here
}
@doc false
@spec new(map) :: t()
def new(params) do
struct!(__MODULE__, params)
end
Error
The function call on line 44 is expected to have type t() but it has type struct()
42 @spec new(map) :: t()
43 def new(params) do
44 struct!(__MODULE__, params)
45 end
46 end