We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The documentation gives an example of using socketio, but using it throws an error:
import { Server, SocketIO } from 'mock-socket';
Module '"mock-socket"' has no exported member 'SocketIO'.
I realize this repo seems to have been abandoned, but does anyone have a usable workaround?
The text was updated successfully, but these errors were encountered:
the type defs are out of date, stick this in your code:
declare module 'mock-socket' { type SocketIO = any }
you can do better than just using any, if you want.
any
Sorry, something went wrong.
I got that error now 'SocketIO' only refers to a type, but is being used as a value here.
'SocketIO' only refers to a type, but is being used as a value here.
class SocketIO { constructor(uri: string, opts?: any); close: () => void; disconnect: () => void; emit: (event: string) => SocketIO; send: (data: any) => SocketIO; on: (type: string, callback: (data: any) => void) => SocketIO; off: (type: string, callback: (data: any) => void) => SocketIO; hasListeners: (type: string) => boolean; }
No branches or pull requests
The documentation gives an example of using socketio, but using it throws an error:
import { Server, SocketIO } from 'mock-socket';
I realize this repo seems to have been abandoned, but does anyone have a usable workaround?
The text was updated successfully, but these errors were encountered: