From 5fd9a5257ddc1bb6e81199944e752082f04cb16a Mon Sep 17 00:00:00 2001 From: Hazmi35 Date: Wed, 15 Nov 2023 13:10:06 +0000 Subject: [PATCH] chore: type cast as ShardOp --- src/Utilities/WebSockets/ProcessBootstrapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utilities/WebSockets/ProcessBootstrapper.ts b/src/Utilities/WebSockets/ProcessBootstrapper.ts index 5261ab5f..d30b306e 100644 --- a/src/Utilities/WebSockets/ProcessBootstrapper.ts +++ b/src/Utilities/WebSockets/ProcessBootstrapper.ts @@ -111,7 +111,7 @@ export class ProcessBootstrapper { public async onConsumeMessage(channel: Channel, message: ConsumeMessage | null) { if (!message) return; channel.ack(message); - const content = JSON.parse(message.content.toString()) as { op: number; data: unknown }; + const content = JSON.parse(message.content.toString()) as { op: ShardOp; data: unknown }; const shardId = RoutingKeyToId(clientId, message.fields.routingKey); switch (content.op) { case ShardOp.SEND: {