Skip to content

Property 'handleUpgrade' does not exist on type 'BaseServer'.ts(2339) #4693

@GreenTea124

Description

@GreenTea124

Describe the bug
When you do this:

import {Server} from "socket.io";

const io = new Server({
	cors: { origin: "*" }
});

//...
io.engine.handleUpgrade(req, socket, head);

Code works but TypeScript produces following error:

Property 'handleUpgrade' does not exist on type 'BaseServer'.ts(2339)

Version

"socket.io": "^4.6.1",
"socket.io-client": "^4.6.1",

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions