Skip to content

Commit

Permalink
Fix typespec for :forward option. (#302)
Browse files Browse the repository at this point in the history
Erlang's `mfa()` means module, function, **arity** and expects an
integer as last tuple element.
  • Loading branch information
maltoe authored Feb 27, 2024
1 parent dc3f2a3 commit 2c13cd2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/chromic_pdf/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ defmodule ChromicPDF.Supervisor do
@type url :: binary()
@type path :: binary()

@type plug_option :: {:url, url()} | {:forward, mfa()}
@type plug_forward :: {module(), atom(), [term()]}
@type plug_option :: {:url, url()} | {:forward, plug_forward()}

@type source_tuple :: {:url, url()} | {:html, iodata()} | {:plug, [plug_option()]}
@type source_and_options :: %{source: source_tuple(), opts: [pdf_option()]}
Expand Down Expand Up @@ -364,7 +365,7 @@ defmodule ChromicPDF.Supervisor do
}
)
You can also pass a MFA to the `:forward` option.
You can also pass a `{module, func, [postargs]}` tuple to the `:forward` option.
### Print from in-memory HTML
Expand Down

0 comments on commit 2c13cd2

Please sign in to comment.