question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to satisfy `Server.adapter()` with `typeof Adapter`?

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
darrachequesnecommented, Feb 25, 2021

@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:

0reactions
darrachequesnecommented, Nov 30, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found