-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathindex.d.ts
25 lines (21 loc) · 802 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { PluginFunction } from 'vue';
import * as SocketIOClient from 'socket.io-client';
import { VueDecorator } from 'vue-class-component';
// augment typings of Vue.js
import "./vue"
export interface SocketToVuexOptions {
actionPrefix?: string;
mutationPrefix?: string;
eventToMutationTransformer?: (eventName: string) => string;
eventToActionTransformer?: (eventName: string) => string;
eventMapping? : (eventMapping : string, socketPayload : any[]) => string
}
export interface VueSocketIOExtOptions extends SocketToVuexOptions{
socket: SocketIOClient.Socket;
}
declare class VueSocketIOExt {
static install: PluginFunction<VueSocketIOExtOptions>;
static defaults: SocketToVuexOptions;
}
export default VueSocketIOExt
export const Socket: (eventName?: string) => VueDecorator;