From 5e2b82c2a9aa1fb6dea19590a6e04bf95db90ef9 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Sat, 8 Oct 2022 22:42:45 +0100 Subject: [PATCH] fix: update typings again --- src/websocket/client.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/websocket/client.ts b/src/websocket/client.ts index 059706be..81fd04fe 100644 --- a/src/websocket/client.ts +++ b/src/websocket/client.ts @@ -1,6 +1,7 @@ import { backOff } from "@insertish/exponential-backoff"; -import WebSocket from "@insertish/isomorphic-ws"; import { ObservableSet, runInAction } from "mobx"; +import WebSocket from "@insertish/isomorphic-ws"; +import type { MessageEvent } from "ws"; import { Role } from "revolt-api"; import { Client } from ".."; @@ -692,7 +693,7 @@ export class WebSocketClient { let processing = false; const queue: WebSocket.MessageEvent[] = []; - ws.onmessage = async (data: string) => { + ws.onmessage = async (data: MessageEvent) => { queue.push(data); if (!processing) {