Initialising the socket.io client with an URL string or undefined depending on the environment (as in the Vue Example in the documentation) produces the following type error: "No overload matches this call."
It is possible to either pass a string or undefined in separate calls, but not a value that has the type string | undefined in one call.
Description
Initialising the socket.io client with an URL string or
undefined
depending on the environment (as in the Vue Example in the documentation) produces the following type error: "No overload matches this call."It is possible to either pass a string or undefined in separate calls, but not a value that has the type
string | undefined
in one call.Reproduction
Client Version:
4.7.2
Expected Behaviour
There should not be a type error since the argument can be of either type, and the code works as expected.