diff --git a/lib/socket.ts b/lib/socket.ts index b90af09..7f68cec 100644 --- a/lib/socket.ts +++ b/lib/socket.ts @@ -15,7 +15,7 @@ export interface SocketOptions { /** * the authentication payload sent when connecting to the Namespace */ - auth: object | ((cb: (data: object) => void) => void); + auth: { [key: string]: any } | ((cb: (data: object) => void) => void); } /** @@ -53,11 +53,11 @@ export class Socket< public connected: boolean; public disconnected: boolean; + public auth: { [key: string]: any } | ((cb: (data: object) => void) => void); public receiveBuffer: Array> = []; public sendBuffer: Array = []; private readonly nsp: string; - private readonly auth: object | ((cb: (data: object) => void) => void); private ids: number = 0; private acks: object = {};