From c15022347c662dc31ee0a3d89cde23641f029783 Mon Sep 17 00:00:00 2001 From: divlo Date: Sat, 20 Mar 2021 14:03:15 +0100 Subject: [PATCH] fix(typings): make `auth` property public (#1455) Related: https://github.com/socketio/socket.io-client/issues/1453 --- lib/socket.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/socket.ts b/lib/socket.ts index b90af0954..7f68cecb2 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 = {};