import SocketIOClient from "socket.io-client"; import { DefaultComputed, DefaultData, DefaultMethods, DefaultProps, PropsDefinition, } from "vue/types/options"; import { Vue } from "vue/types/vue"; import { PluginFunction, PluginObject } from "vue"; interface socketHandler { (this: T, ...args: any[]): SocketIOClient.Socket } declare module 'vue/types/vue' { interface Vue { $socket: SocketIOClient.Socket } } declare module 'vue/types/options' { interface ComponentOptions< V extends Vue, Data=DefaultData, Methods=DefaultMethods, Computed=DefaultComputed, PropsDef=PropsDefinition, Props=DefaultProps> { sockets: {[key: string]: socketHandler} } } export interface VueSocketOptions { debug?: boolean; connection: string, vuex?: { store?: any, actionPrefix?: string, mutationPrefix?: string, options?: { useConnectionNamespace?: boolean } } } export default class VueSocketIO implements PluginObject { constructor (options: VueSocketOptions); install: PluginFunction }