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>
This commit is contained in:
Taureon
2026-07-18 05:34:38 +02:00
committed by GitHub
parent ed6ee065fe
commit 2c3d0c5366
+1 -2
View File
@@ -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: [];