update structure

This commit is contained in:
2016-08-12 01:32:57 +02:00
parent 19a883c641
commit cb3d7f4d7b
4 changed files with 65 additions and 12 deletions

View File

@@ -11,11 +11,11 @@ import { SocketRole } from "./smartsocket.classes.socketrole";
/**
* interface for constructor of class SocketConnection
*/
export interface ISocketConnectionOptions {
export interface ISocketConnectionConstructorOptions {
alias?: string;
authenticated: boolean;
role?: SocketRole;
socket: SocketIO.Socket;
socket?: SocketIO.Socket | SocketIOClient.Socket;
};
/**
@@ -36,8 +36,8 @@ export class SocketConnection {
alias?: string;
authenticated: boolean;
role?: SocketRole;
socket: SocketIO.Socket;
constructor(optionsArg: ISocketConnectionOptions) {
socket: SocketIO.Socket | SocketIOClient.Socket;
constructor(optionsArg: ISocketConnectionConstructorOptions) {
this.alias = optionsArg.alias;
this.authenticated = optionsArg.authenticated;
this.role = optionsArg.role;