How to satisfy `Server.adapter()` with `typeof Adapter`?
See original GitHub issueDescribe the bug
I am not sure if this is just a question or the typings are not correct, but it seems impossible for me to satisfy the Server.adapter()
function which is defined as:
adapter(v: typeof Adapter): Server;
I tried:
createAdapter(): Adapter {}
createAdapter(): typeof Adapter {}
createAdapter(): ReturnType<Adapter> {}
createAdapter(): ReturnType<typeof Adapter> {}
Looking at socket.ioredis it just has no return type / returns any 😕
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
SWIFTNet Server Adapter - IBM
The SWIFTNet Server adapter communicates to the SWIFTNet Network (for SWIFTNet version 6.x) through the SWIFTNet Server. It responds to and accepts InterAct ......
Read more >3 Using the Adapter Factory - Oracle Help Center
This type of adapter, which can generate, modify, or verify the value of a form field automatically, is called a rule generator. Oracle...
Read more >How to Set up Teaming with an Intel® Ethernet Adapter in...
Remove all drivers and Intel® PROSet software as follows: Access Device Manager 1. Expand Network Adapters. Right-click each entry of an Intel® Ethernet...
Read more >Solarflare Server Adapter User Guide - Xilinx
Certain products are subject to the terms and conditions of Xilinx's limited warranty, please refer to Xilinx's Terms of Sale which can be...
Read more >Debug Adapter Configuration (OpenOCD User's Guide)
These commands tell OpenOCD what type of JTAG adapter you have, and how to talk to it. A few cases are so simple...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@MickL I think you are right, the typings are not correct.
The
adapter
argument should be a function that takes a namespace and returns an Adapter instance. Example:This should be fixed by https://github.com/socketio/socket.io/commit/891b1870e92d1ec38910f03bb839817e2d6be65a.
Please reopen if needed.