Skip to content

Commit

Permalink
Merge pull request #449 from chulkilee/fix-typespec
Browse files Browse the repository at this point in the history
Fix typespec of adapter
  • Loading branch information
teamon authored Mar 24, 2021
2 parents b7d3326 + f847093 commit c3cde5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/tesla.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ defmodule Tesla.Env do
@type status :: integer | nil
@type opts :: keyword

@type stack :: [{atom, atom, any} | {atom, atom} | {:fn, (t -> t)} | {:fn, (t, stack -> t)}]
@type runtime :: {atom, atom, any} | {atom, atom} | {:fn, (t -> t)} | {:fn, (t, stack -> t)}
@type stack :: [runtime]
@type result :: {:ok, t()} | {:error, any}

@type t :: %__MODULE__{
Expand Down
2 changes: 1 addition & 1 deletion lib/tesla/client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Tesla.Client do
@type t :: %__MODULE__{
pre: Tesla.Env.stack(),
post: Tesla.Env.stack(),
adapter: adapter | nil
adapter: Tesla.Env.runtime() | nil
}
defstruct fun: nil,
pre: [],
Expand Down

0 comments on commit c3cde5f

Please sign in to comment.