You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
According to Socket IO's documentation, query option could be a number as well and with JavaScript, it works as it expected. However there are Type errors with Typescript
To Reproduce
Client
// my-file.ts (Example from docs)import{io}from"socket.io-client";constsocket=io({query: {x: 42}});
Expected behavior
No Type errors.
Received Errror
No overload matches this call.
Overload 1 of 3, '(uri: string, opts?: Partial<ManagerOptions & SocketOptions>): Socket<DefaultEventsMap, DefaultEventsMap>', gave the following error.
Type 'number' is not assignable to type 'string'.
Overload 2 of 3, '(uri: string | Partial<ManagerOptions & SocketOptions>, opts?: Partial<ManagerOptions & SocketOptions>): Socket<...>', gave the following error.
Type 'number' is not assignable to type 'string'.ts(2769)
The text was updated successfully, but these errors were encountered:
Describe the bug
According to Socket IO's documentation,
query
option could be a number as well and with JavaScript, it works as it expected. However there are Type errors with TypescriptTo Reproduce
Client
Expected behavior
No Type errors.
Received Errror
The text was updated successfully, but these errors were encountered: