You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
httpServer is http2.Http2SecureServer
when calling new Server(httpServer, {}), TS2769: No overload matches this call. None of the signatures accepts Http2SecureServer.
The full error is:
TS2769: No overload matches this call.
Overload 1 of 3, '(srv?: number | import("http").Server<...> | import("https").Server<...> | undefined, opts?: Partial<...> | undefined): Server<...>', gave the following error.
Argument of type 'Http2SecureServer' is not assignable to parameter of type 'number | Server<...> | Server<...> | undefined'.
Type 'Http2SecureServer' is missing the following properties from type 'Server<typeof IncomingMessage, typeof ServerResponse>': closeAllConnections, closeIdleConnections, maxHeadersCount, maxRequestsPerSocket, and 4 more.
Overload 2 of 3, '(srv: number | import("http").Server<...> | import("https").Server<...> | Partial<...> | undefined, opts?: Partial<...> | undefined): Server<...>', gave the following error. Argument of type 'Http2SecureServer' is not assignable to parameter of type 'number | Server<...> | Server<...> | Partial<...> | undefined'.
Type 'Http2SecureServer' is not assignable to type 'Server<typeof IncomingMessage, typeof ServerResponse>'.
Describe the bug
The documentation indicates the following code for server initialisation with http2:
httpServer
ishttp2.Http2SecureServer
when calling
new Server(httpServer, {})
,TS2769: No overload matches this call.
None of the signatures accepts Http2SecureServer.The full error is:
To Reproduce
Please fill the following code example:
Socket.IO server version:
4.5.2
Server
(copy-pasted 1:1 from https://socket.io/docs/v4/server-initialization/#with-an-http2-server for TypeScript)
Platform:
The text was updated successfully, but these errors were encountered: