Skip to content

Commit

Permalink
fix: type comment position (#2443)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsctx authored and metcoder95 committed Nov 22, 2023
1 parent c29b9c0 commit 418b951
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1682,6 +1682,7 @@ function writeH2 (client, session, request) {
return false
}

/** @type {import('node:http2').ClientHttp2Stream} */
let stream
const h2State = client[kHTTP2SessionState]

Expand Down Expand Up @@ -1777,14 +1778,10 @@ function writeH2 (client, session, request) {
const shouldEndStream = method === 'GET' || method === 'HEAD'
if (expectContinue) {
headers[HTTP2_HEADER_EXPECT] = '100-continue'
/**
* @type {import('node:http2').ClientHttp2Stream}
*/
stream = session.request(headers, { endStream: shouldEndStream, signal })

stream.once('continue', writeBodyH2)
} else {
/** @type {import('node:http2').ClientHttp2Stream} */
stream = session.request(headers, {
endStream: shouldEndStream,
signal
Expand Down

0 comments on commit 418b951

Please sign in to comment.