From 843db1727b0a9178f2c67497bf96d0ecfc6e0a45 Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Sun, 24 Mar 2024 14:23:07 +0100 Subject: [PATCH] server: actually type the socket --- server/server.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/server.ts b/server/server.ts index 60b81c3d..8c5a7f3f 100644 --- a/server/server.ts +++ b/server/server.ts @@ -3,7 +3,7 @@ import {Server as wsServer} from "ws"; import express, {NextFunction, Request, Response} from "express"; import fs from "fs"; import path from "path"; -import {Server, Socket} from "socket.io"; +import {Server, Socket as ioSocket} from "socket.io"; import dns from "dns"; import colors from "chalk"; import net from "net"; @@ -51,6 +51,8 @@ type IndexTemplateConfiguration = ServerConfiguration & { cacheBust: string; }; +type Socket = ioSocket; + // A random number that will force clients to reload the page if it differs const serverHash = Math.floor(Date.now() * Math.random());