mirror of
https://github.com/MetinSeylan/Vue-Socket.io.git
synced 2025-04-16 15:21:28 +02:00
update
This commit is contained in:
parent
847e567cc2
commit
13bb9944e6
1 changed files with 19 additions and 0 deletions
19
index.d.ts
vendored
19
index.d.ts
vendored
|
@ -7,6 +7,7 @@ import {
|
||||||
PropsDefinition,
|
PropsDefinition,
|
||||||
} from "vue/types/options";
|
} from "vue/types/options";
|
||||||
import { Vue } from "vue/types/vue";
|
import { Vue } from "vue/types/vue";
|
||||||
|
import { PluginFunction, PluginObject } from "vue";
|
||||||
|
|
||||||
interface socketHandler<T> {
|
interface socketHandler<T> {
|
||||||
(this: T, ...args: any[]): SocketIOClient.Socket
|
(this: T, ...args: any[]): SocketIOClient.Socket
|
||||||
|
@ -29,3 +30,21 @@ declare module 'vue/types/options' {
|
||||||
sockets: {[key: string]: socketHandler<V>}
|
sockets: {[key: string]: socketHandler<V>}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface VueSocketOptions {
|
||||||
|
debug?: boolean;
|
||||||
|
connection: string,
|
||||||
|
vuex?: {
|
||||||
|
store?: any,
|
||||||
|
actionPrefix?: string,
|
||||||
|
mutationPrefix?: string,
|
||||||
|
options?: {
|
||||||
|
useConnectionNamespace?: boolean
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class VueSocketIO<T> implements PluginObject<T> {
|
||||||
|
constructor (options: VueSocketOptions);
|
||||||
|
install: PluginFunction<T>
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue