diff --git a/client/js/socket.ts b/client/js/socket.ts index d4752142..a3c0bca3 100644 --- a/client/js/socket.ts +++ b/client/js/socket.ts @@ -1,7 +1,9 @@ -import io, {Socket} from "socket.io-client"; +import io, {Socket as rawSocket} from "socket.io-client"; import type {ServerToClientEvents, ClientToServerEvents} from "../../shared/types/socket-events"; -const socket: Socket = io({ +type Socket = rawSocket; + +const socket: Socket = io({ transports: JSON.parse(document.body.dataset.transports || "['polling', 'websocket']"), path: window.location.pathname + "socket.io/", autoConnect: false,