From 2c3d0c5366fab04034c78a7bf92177423142719b Mon Sep 17 00:00:00 2001 From: Taureon <45183108+Taureon@users.noreply.github.com> Date: Sat, 18 Jul 2026 05:34:38 +0200 Subject: [PATCH] fix: Specify argument in Client "error" event to be Error instead of any. (#125) Client.ts: change Events.error callback argument from any to Error Only location where the "error" event was emitted: https://github.com/stoatchat/javascript-client-sdk/blob/cdf406094b9b81c3ff285b14ed97fb3d138e3061/src/Client.ts#L263 Callback argument type where that "error" event comes from: https://github.com/stoatchat/javascript-client-sdk/blob/main/src/events/EventClient.ts#L70 Signed-off-by: Taureon <45183108+Taureon@users.noreply.github.com> --- src/Client.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Client.ts b/src/Client.ts index ff9c035f..55aee0b9 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -48,8 +48,7 @@ export type Session = { _id: string; token: string; user_id: string } | string; * Events provided by the client */ export type Events = { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - error: [error: any]; + error: [error: Error]; connected: []; connecting: [];