New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Types for Client Initialisation #4873
Labels
bug
Something isn't working
Comments
I could indeed reproduce the issue, I'm digging into this. |
darrachequesne
added
bug
Something isn't working
and removed
to triage
Waiting to be triaged by a member of the team
labels
Nov 23, 2023
darrachequesne
added a commit
to socketio/socket.io-client
that referenced
this issue
Nov 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: