Finch.Request.t() typespec
visciang opened this issue · comments
Giovanni Visciano commented
While looking at the hexdoc to get the type of some request fields, I've seen that the Finch.Request.t()
struct is not "typespec-ed", or better it's defined as:
Line 52 in a5a5e3c
This results to:
https://hexdocs.pm/finch/Finch.Request.html#t:t/0
The @type
could be defined as:
@type t :: %__MODULE__{
scheme: Mint.Types.scheme(),
host: String.t(),
port: :inet.port_number(),
method: String.t(),
path: String.t(),
headers: headers(),
body: body(),
query: String.t(),
unix_socket: nil | String.t()
}
Is that intentional?
If not I can open a PR, just ping me here.
Thank you
nico piderman commented
Thanks @visciang ! I am not opposed to adding typespecs for all of the fields in the %Request{}
struct. A PR is welcome!