diff --git a/CHANGELOG.md b/CHANGELOG.md index 682db20b..f166a226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.1.4 - 2021-07-06 + +### Fixed + +- Fixed typespec for `Mint.WebSocket.new/4` + ## 0.1.3 - 2021-07-02 ### Fixed diff --git a/lib/mint/web_socket.ex b/lib/mint/web_socket.ex index 45a783af..f490375e 100644 --- a/lib/mint/web_socket.ex +++ b/lib/mint/web_socket.ex @@ -306,8 +306,8 @@ defmodule Mint.WebSocket do Mint.WebSocket.new(conn, ref, status, resp_headers) ``` """ - @spec new(Mint.HTTP.t(), reference(), pos_integer(), Mint.Types.headers()) :: - {:ok, Mint.HTTP.t(), t(), [Mint.Types.response()]} | {:error, Mint.HTTP.t(), error()} + @spec new(Mint.HTTP.t(), reference(), Mint.Types.status(), Mint.Types.headers()) :: + {:ok, Mint.HTTP.t(), t()} | {:error, Mint.HTTP.t(), error()} def new(%Mint.HTTP1{} = conn, _request_ref, status, _response_headers) when status != 101 do {:error, conn, %WebSocketError{reason: :connection_not_upgraded}}