From 1ba8e3ea88d0cc97d5b5463fcbfdc5280192c505 Mon Sep 17 00:00:00 2001 From: Kaan Date: Sun, 31 Oct 2021 23:34:37 +0100 Subject: [PATCH] bugfix: Type improvements on "port" option in Socket and SocketOptions types. --- lib/socket.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/socket.ts b/lib/socket.ts index bbd390da4..fdc6bc87d 100644 --- a/lib/socket.ts +++ b/lib/socket.ts @@ -27,7 +27,7 @@ export interface SocketOptions { /** * The port for our connection. Set from the URI passed when connecting */ - port: string; + port: string | number; /** * Any query parameters in our uri. Set from the URI passed when connecting @@ -253,7 +253,7 @@ export class Socket extends Emitter<{}, {}, SocketReservedEvents> { private readonly opts: Partial; private readonly secure: boolean; private readonly hostname: string; - private readonly port: string; + private readonly port: string | number; private readonly transports: string[]; static priorWebsocketSuccess: boolean;