defstruct accounts: [], item: nil, numbers: [], request_id: nil
@type t :: %__MODULE__{
accounts: [Plaid.Accounts.Account.t()],
item: Plaid.Item.t(),
numbers: %{
ach: [Plaid.Auth.Numbers.ACH.t()],
eft: [Plaid.Auth.Numbers.EFT.t()],
international: [Plaid.Auth.Numbers.International.t()],
bacs: [Plaid.Auth.Numbers.BACS.t()]
},
request_id: String.t()
}
** (FunctionClauseError) no function clause matching in Forma.Typespecs.map/3
The following arguments were given to Forma.Typespecs.map/3:
# 1
[{:type, 26, :map_field_assoc, [{:atom, 0, :options}, {:type, 26, :map, [{:type, 27, :map_field_assoc, [{:atom, 0, :account_ids}, {:type, 0, :list, [{:remote_type, 27, [{:atom, 0, String}, {:atom, 0, :t}, []]}]}]}]}]}]
# 2
Plaid.Auth
# 3
%{"access_token" => {:access_token, {{String, :t}, []}}}
Attempted function clauses (showing 2 out of 2):
def map([{:type, _, :map_field_exact, [{field_type, _, name}, typ]} | rest], module, acc)
def map([], _module, acc)
def compile(module, rewriters \\ %{}) do
module
|> Kernel.Typespec.beam_types()
|> rewrite(module, rewriters)
|> Enum.map(fn {t, d} -> {{module, t}, d} end)
|> Enum.into(%{})
end
...
# Add rewriters arg on final pattern match
def rewrite([], _, _module, rewriters) do
...
end
end
For the struct definition:
Getting this error from
Form.Typespecs.compile(Plaid.Auth)Would be helpful to either allow a custom
rewritersprop to be added toForm.Typespecs.compile/1as in: