From 453f530c5d9915ae512148dd4ed681a43534cacf Mon Sep 17 00:00:00 2001 From: delucis Date: Mon, 21 Feb 2022 17:09:15 +0100 Subject: [PATCH] fix(types): Use correct socket.io options typing Co-Authored-By: fuenfundachtzig <8006302+fuenfundachtzig@users.noreply.github.com> --- src/client/transport/socketio.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/client/transport/socketio.ts b/src/client/transport/socketio.ts index b48c7e44c..bd586d356 100644 --- a/src/client/transport/socketio.ts +++ b/src/client/transport/socketio.ts @@ -24,9 +24,13 @@ import type { ChatMessage, } from '../../types'; +type SocketOpts = Partial< + ioNamespace.SocketOptions & ioNamespace.ManagerOptions +>; + interface SocketIOOpts { server?: string; - socketOpts?: ioNamespace.SocketOptions; + socketOpts?: SocketOpts; } type SocketIOTransportOpts = TransportOpts & @@ -42,7 +46,7 @@ type SocketIOTransportOpts = TransportOpts & export class SocketIOTransport extends Transport { server: string; socket: ioNamespace.Socket; - socketOpts: ioNamespace.SocketOptions; + socketOpts: SocketOpts; /** * Creates a new Multiplayer instance.