Mirror: A Node.js fetch shim using built-in Request, Response, and Headers (but without native fetch)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: Fix socket type in `createConnection` (#21)

authored by

Phil Pluckthun and committed by
GitHub
a12b047b 2c9cc4e2

+3 -3
+3 -3
src/agent.ts
··· 7 7 createConnection( 8 8 opts: https.RequestOptions, 9 9 callback?: (err: Error | null, socket: net.Socket | null) => void 10 - ): net.Socket; 10 + ): net.Socket | null; 11 11 } 12 12 } 13 13 ··· 219 219 createConnection( 220 220 options: https.RequestOptions, 221 221 callback?: (err: Error | null, socket: net.Socket | null) => void 222 - ): net.Socket { 222 + ): net.Socket | null { 223 223 const request = (this._proxy.protocol === 'http:' ? http : https).request( 224 224 createRequestOptions(this._proxy, this._keepAlive, options) 225 225 ); ··· 253 253 }); 254 254 255 255 request.end(); 256 - return request.socket!; 256 + return request.socket; 257 257 } 258 258 }