Skip to content

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

@MickL

Description

@MickL

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions